Alex Villacís Lasso : uxtheme: Skip creation of temporary bitmap when painting a single tile.

Alexandre Julliard julliard at winehq.org
Thu Apr 24 06:23:13 CDT 2008


Module: wine
Branch: master
Commit: 4165a1f696213fc6af67fd8abfb0e5d74729cc3e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4165a1f696213fc6af67fd8abfb0e5d74729cc3e

Author: Alex Villacís Lasso <a_villacis at palosanto.com>
Date:   Wed Apr 23 09:48:44 2008 -0500

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

---

 dlls/uxtheme/draw.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c
index 3650113..9c7d62b 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(). */




More information about the wine-cvs mailing list