From 810d215a3c53f4a2d027ab660a69a1c2d2abbdcf Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 12 Dec 2011 21:21:28 +0100 Subject: [PATCH] winex11: Get rid of the GetPixel implementation, use the null driver fallback instead. --- dlls/winex11.drv/graphics.c | 52 ------------------------------------- dlls/winex11.drv/init.c | 2 +- dlls/winex11.drv/x11drv.h | 1 - 3 files changed, 1 insertion(+), 54 deletions(-) diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index 0f723893dc5..163afd207c8 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -1092,58 +1092,6 @@ COLORREF X11DRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) } -/*********************************************************************** - * X11DRV_GetPixel - */ -COLORREF X11DRV_GetPixel( PHYSDEV dev, INT x, INT y ) -{ - static Pixmap pixmap = 0; - X11DRV_PDEVICE *physDev = get_x11drv_dev( dev ); - XImage * image; - int pixel; - POINT pt; - BOOL memdc = (GetObjectType(dev->hdc) == OBJ_MEMDC); - - pt.x = x; - pt.y = y; - LPtoDP( dev->hdc, &pt, 1 ); - - /* Update the pixmap from the DIB section */ - X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod); - - wine_tsx11_lock(); - if (memdc) - { - image = XGetImage( gdi_display, physDev->drawable, - physDev->dc_rect.left + pt.x, physDev->dc_rect.top + pt.y, - 1, 1, AllPlanes, ZPixmap ); - } - else - { - /* If we are reading from the screen, use a temporary copy */ - /* to avoid a BadMatch error */ - if (!pixmap) pixmap = XCreatePixmap( gdi_display, root_window, - 1, 1, physDev->depth ); - XCopyArea( gdi_display, physDev->drawable, pixmap, get_bitmap_gc(physDev->depth), - physDev->dc_rect.left + pt.x, physDev->dc_rect.top + pt.y, 1, 1, 0, 0 ); - image = XGetImage( gdi_display, pixmap, 0, 0, 1, 1, AllPlanes, ZPixmap ); - } - pixel = XGetPixel( image, 0, 0 ); - XDestroyImage( image ); - wine_tsx11_unlock(); - - /* Update the DIBSection from the pixmap */ - X11DRV_UnlockDIBSection(physDev, FALSE); - if( physDev->depth > 1) - pixel = X11DRV_PALETTE_ToLogical(physDev, pixel); - else - /* monochrome bitmaps return black or white */ - if( pixel) pixel = 0xffffff; - return pixel; - -} - - /*********************************************************************** * X11DRV_PaintRgn */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 39a57b5f6bd..b094e0a31b9 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -512,7 +512,7 @@ static const struct gdi_dc_funcs x11drv_funcs = NULL, /* pGetKerningPairs */ X11DRV_GetNearestColor, /* pGetNearestColor */ NULL, /* pGetOutlineTextMetrics */ - X11DRV_GetPixel, /* pGetPixel */ + NULL, /* pGetPixel */ X11DRV_GetPixelFormat, /* pGetPixelFormat */ X11DRV_GetSystemPaletteEntries, /* pGetSystemPaletteEntries */ NULL, /* pGetTextCharsetInfo */ diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 7c12360faad..922aa9aaaea 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -198,7 +198,6 @@ extern BOOL X11DRV_GetICMProfile( PHYSDEV dev, LPDWORD size, LPWSTR filename ) D extern DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, struct gdi_image_bits *bits, struct bitblt_coords *src ) DECLSPEC_HIDDEN; extern COLORREF X11DRV_GetNearestColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN; -extern COLORREF X11DRV_GetPixel( PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN; extern UINT X11DRV_GetSystemPaletteEntries( PHYSDEV dev, UINT start, UINT count, LPPALETTEENTRY entries ) DECLSPEC_HIDDEN; extern BOOL X11DRV_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR str, INT count, INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size ) DECLSPEC_HIDDEN;