Commit 810d215a authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Get rid of the GetPixel implementation, use the null driver fallback instead.

parent 9f410413
......@@ -1093,58 +1093,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
*/
BOOL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn )
......
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment