From 4165a1f696213fc6af67fd8abfb0e5d74729cc3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Wed, 23 Apr 2008 09:48:44 -0500 Subject: [PATCH] uxtheme: Skip creation of temporary bitmap when painting a single tile. --- dlls/uxtheme/draw.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index 3650113e49..9c7d62b20b 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -345,6 +345,18 @@ static inline BOOL UXTHEME_SizedBlt (HDC hdcDst, int nXOriginDst, int nYOriginDs 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 bitmap, with standard GDI functions. This is faster than an iteration with UXTHEME_Blt(). */ -- 2.32.0.93.g670b81a890