Alexandre Julliard : winex11: Avoid using DIB functions to create the dithering image.

Alexandre Julliard julliard at winehq.org
Wed Jan 11 13:39:58 CST 2012


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Jan 10 16:29:47 2012 +0100

winex11: Avoid using DIB functions to create the dithering image.

---

 dlls/winex11.drv/brush.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/winex11.drv/brush.c b/dlls/winex11.drv/brush.c
index afc1e0b..216c142 100644
--- a/dlls/winex11.drv/brush.c
+++ b/dlls/winex11.drv/brush.c
@@ -112,17 +112,21 @@ static Pixmap BRUSH_DitherColor( COLORREF color, int depth)
     Pixmap pixmap;
     GC gc = get_bitmap_gc(depth);
 
+    wine_tsx11_lock();
     if (!ditherImage)
     {
-        ditherImage = X11DRV_DIB_CreateXImage( MATRIX_SIZE, MATRIX_SIZE, depth );
-        if (!ditherImage) 
+        ditherImage = XCreateImage( gdi_display, visual, depth, ZPixmap, 0,
+                                    NULL, MATRIX_SIZE, MATRIX_SIZE, 32, 0 );
+        if (!ditherImage)
         {
+            wine_tsx11_unlock();
             ERR("Could not create dither image\n");
             return 0;
         }
+        ditherImage->data = HeapAlloc( GetProcessHeap(), 0,
+                                       ditherImage->height * ditherImage->bytes_per_line );
     }
 
-    wine_tsx11_lock();
     if (color != prevColor)
     {
 	int r = GetRValue( color ) * DITHER_LEVELS;




More information about the wine-cvs mailing list