Alexandre Julliard : winex11: Fix selecting a pattern brush into a DIB section device.

Alexandre Julliard julliard at winehq.org
Thu Nov 17 12:52:35 CST 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Nov 17 17:33:50 2011 +0100

winex11: Fix selecting a pattern brush into a DIB section device.

---

 dlls/winex11.drv/xrender.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 0b7c964..036ab94 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -2985,18 +2985,13 @@ static HBRUSH xrenderdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, HBITMAP bitmap
 
     if (!bitmap || !(physbitmap = X11DRV_get_phys_bitmap( bitmap )))
     {
-        format = get_bitmap_format( info->bmiHeader.biBitCount );
-        if (format == physdev->format || !pict_formats[format]) goto x11drv_fallback;
         if (!(bitmap = create_brush_bitmap( physdev->x11dev, info, bits, usage ))) return 0;
         physbitmap = X11DRV_get_phys_bitmap( bitmap );
         delete_bitmap = TRUE;
     }
-    else
-    {
-        format = get_xrender_format_from_color_shifts( physbitmap->depth, &physbitmap->color_shifts );
-        if (format == WXR_FORMAT_MONO || format == physdev->format || !pict_formats[format])
-            goto x11drv_fallback;
-    }
+
+    format = get_xrender_format_from_color_shifts( physbitmap->depth, &physbitmap->color_shifts );
+    if (format == WXR_FORMAT_MONO || !pict_formats[format]) goto x11drv_fallback;
 
     GetObjectW( bitmap, sizeof(bm), &bm );
 




More information about the wine-cvs mailing list