Alexandre Julliard : winex11: Avoid using DIB functions to create the dithering image.
Module: wine Branch: master Commit: 978c42feb5efcee2a0dbf7af9ecba5284a0746e1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=978c42feb5efcee2a0dbf7af9e... Author: Alexandre Julliard <julliard(a)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;
participants (1)
-
Alexandre Julliard