Alexandre Julliard : winex11: Get rid of the no longer used GetBitmapBits implementation.
Alexandre Julliard
julliard at winehq.org
Tue Jul 26 11:37:52 CDT 2011
Module: wine
Branch: master
Commit: 96c1b3bbc23e7a0f880507f3274e700a7ecdaaaa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=96c1b3bbc23e7a0f880507f3274e700a7ecdaaaa
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jul 25 20:32:17 2011 +0200
winex11: Get rid of the no longer used GetBitmapBits implementation.
---
dlls/winex11.drv/bitmap.c | 123 ---------------------------------------------
dlls/winex11.drv/init.c | 2 +-
dlls/winex11.drv/x11drv.h | 1 -
3 files changed, 1 insertions(+), 125 deletions(-)
diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c
index 7ed008a..15ecb05 100644
--- a/dlls/winex11.drv/bitmap.c
+++ b/dlls/winex11.drv/bitmap.c
@@ -204,129 +204,6 @@ BOOL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap, LPVOID bmBits )
}
-/***********************************************************************
- * GetBitmapBits (X11DRV.@)
- *
- * RETURNS
- * Success: Number of bytes copied
- * Failure: 0
- */
-LONG X11DRV_GetBitmapBits( HBITMAP hbitmap, void *buffer, LONG count )
-{
- BITMAP bitmap;
- X_PHYSBITMAP *physBitmap = X11DRV_get_phys_bitmap( hbitmap );
- LONG height;
- XImage *image;
- LPBYTE tbuf, startline;
- int h, w;
-
- if (!physBitmap || !GetObjectW( hbitmap, sizeof(bitmap), &bitmap )) return 0;
-
- TRACE("(bmp=%p, buffer=%p, count=0x%x)\n", hbitmap, buffer, count);
-
- wine_tsx11_lock();
- height = count / bitmap.bmWidthBytes;
- image = XGetImage( gdi_display, physBitmap->pixmap, 0, 0,
- bitmap.bmWidth, height, AllPlanes, ZPixmap );
-
- /* copy XImage to 16 bit padded image buffer with real bitsperpixel */
-
- startline = buffer;
- switch (bitmap.bmBitsPixel)
- {
- case 1:
- for (h=0;h<height;h++)
- {
- tbuf = startline;
- *tbuf = 0;
- for (w=0;w<bitmap.bmWidth;w++)
- {
- if ((w%8) == 0)
- *tbuf = 0;
- *tbuf |= XGetPixel(image,w,h)<<(7-(w&7));
- if ((w&7) == 7) ++tbuf;
- }
- startline += bitmap.bmWidthBytes;
- }
- break;
- case 4:
- for (h=0;h<height;h++)
- {
- tbuf = startline;
- for (w=0;w<bitmap.bmWidth;w++)
- {
- if (!(w & 1)) *tbuf = XGetPixel( image, w, h) << 4;
- else *tbuf++ |= XGetPixel( image, w, h) & 0x0f;
- }
- startline += bitmap.bmWidthBytes;
- }
- break;
- case 8:
- for (h=0;h<height;h++)
- {
- tbuf = startline;
- for (w=0;w<bitmap.bmWidth;w++)
- *tbuf++ = XGetPixel(image,w,h);
- startline += bitmap.bmWidthBytes;
- }
- break;
- case 15:
- case 16:
- for (h=0;h<height;h++)
- {
- tbuf = startline;
- for (w=0;w<bitmap.bmWidth;w++)
- {
- long pixel = XGetPixel(image,w,h);
-
- *tbuf++ = pixel & 0xff;
- *tbuf++ = (pixel>>8) & 0xff;
- }
- startline += bitmap.bmWidthBytes;
- }
- break;
- case 24:
- for (h=0;h<height;h++)
- {
- tbuf = startline;
- for (w=0;w<bitmap.bmWidth;w++)
- {
- long pixel = XGetPixel(image,w,h);
-
- *tbuf++ = pixel & 0xff;
- *tbuf++ = (pixel>> 8) & 0xff;
- *tbuf++ = (pixel>>16) & 0xff;
- }
- startline += bitmap.bmWidthBytes;
- }
- break;
-
- case 32:
- for (h=0;h<height;h++)
- {
- tbuf = startline;
- for (w=0;w<bitmap.bmWidth;w++)
- {
- long pixel = XGetPixel(image,w,h);
-
- *tbuf++ = pixel & 0xff;
- *tbuf++ = (pixel>> 8) & 0xff;
- *tbuf++ = (pixel>>16) & 0xff;
- *tbuf++ = (pixel>>24) & 0xff;
- }
- startline += bitmap.bmWidthBytes;
- }
- break;
- default:
- FIXME("Unhandled bits:%d\n", bitmap.bmBitsPixel);
- }
- XDestroyImage( image );
- wine_tsx11_unlock();
- return count;
-}
-
-
-
/******************************************************************************
* SetBitmapBits (X11DRV.@)
*
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 26a7973..5e12e27 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -480,7 +480,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL, /* pFlattenPath */
NULL, /* pFrameRgn */
NULL, /* pGdiComment */
- X11DRV_GetBitmapBits, /* pGetBitmapBits */
+ NULL, /* pGetBitmapBits */
X11DRV_GetCharWidth, /* pGetCharWidth */
X11DRV_GetDeviceCaps, /* pGetDeviceCaps */
X11DRV_GetDeviceGammaRamp, /* pGetDeviceGammaRamp */
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 8da451a..30fc62e 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -198,7 +198,6 @@ extern INT X11DRV_EnumICMProfiles( PHYSDEV dev, ICMENUMPROCW proc, LPARAM lparam
extern BOOL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags, const RECT *lprect,
LPCWSTR str, UINT count, const INT *lpDx ) DECLSPEC_HIDDEN;
-extern LONG X11DRV_GetBitmapBits( HBITMAP hbitmap, void *bits, LONG count ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buffer ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetDeviceGammaRamp( PHYSDEV dev, LPVOID ramp ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetICMProfile( PHYSDEV dev, LPDWORD size, LPWSTR filename ) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list