uxtheme: Skip creation of temporary bitmap when painting a single tile.

This commit is contained in:
Alex Villacís Lasso 2008-04-23 09:48:44 -05:00 committed by Alexandre Julliard
parent 6a42264053
commit 4165a1f696
1 changed files with 12 additions and 0 deletions

View File

@ -345,6 +345,18 @@ static inline BOOL UXTHEME_SizedBlt (HDC hdcDst, int nXOriginDst, int nYOriginDs
if (!nWidthSrc || !nHeightSrc) return TRUE; if (!nWidthSrc || !nHeightSrc) return TRUE;
/* For destination width/height less than or equal to source
width/height, do not bother with memory bitmap optimization */
if (nWidthSrc >= nWidthDst && nHeightSrc >= nHeightDst)
{
int bltWidth = min (nWidthDst, nWidthSrc);
int bltHeight = min (nHeightDst, nHeightSrc);
return UXTHEME_Blt (hdcDst, nXOriginDst, nYOriginDst, bltWidth, bltHeight,
hdcSrc, nXOriginSrc, nYOriginSrc,
transparent, transcolor);
}
/* Create a DC with a bitmap consisting of a tiling of the source /* Create a DC with a bitmap consisting of a tiling of the source
bitmap, with standard GDI functions. This is faster than an bitmap, with standard GDI functions. This is faster than an
iteration with UXTHEME_Blt(). */ iteration with UXTHEME_Blt(). */