Commit b16e32a3 authored by Alexandre Julliard's avatar Alexandre Julliard

Store the bitmap handle in the phys bitmap structure, and avoid a few

more GDI_GetObjPtr calls.
parent 52cf1992
......@@ -431,7 +431,7 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap )
if (physBitmap)
{
if (physBitmap->dib) X11DRV_DIB_DeleteDIBSection( physBitmap, bmp );
if (physBitmap->dib) X11DRV_DIB_DeleteDIBSection( physBitmap );
wine_tsx11_lock();
if (physBitmap->pixmap) XFreePixmap( gdi_display, physBitmap->pixmap );
wine_tsx11_unlock();
......@@ -477,6 +477,7 @@ X_PHYSBITMAP *X11DRV_init_phys_bitmap( HBITMAP hbitmap )
{
if ((ret = HeapAlloc( GetProcessHeap(), 0, sizeof(*ret) )) != NULL)
{
ret->hbitmap = hbitmap;
ret->pixmap = 0;
ret->pixmap_depth = bmp->bitmap.bmBitsPixel;
ret->dib = NULL;
......
......@@ -50,7 +50,6 @@ typedef int Status;
#define MAX_PIXELFORMATS 8
struct tagBITMAPOBJ;
struct tagCURSORICONINFO;
struct dce;
......@@ -82,6 +81,7 @@ typedef struct
/* X physical bitmap */
typedef struct
{
HBITMAP hbitmap;
Pixmap pixmap;
int pixmap_depth;
struct _X11DRV_DIBSECTION *dib;
......@@ -433,13 +433,10 @@ extern int *X11DRV_DIB_BuildColorMap( X11DRV_PDEVICE *physDev, WORD coloruse,
extern INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev,INT,BOOL);
extern INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev,INT,BOOL);
extern void X11DRV_UnlockDIBSection(X11DRV_PDEVICE *physDev,BOOL);
extern INT X11DRV_CoerceDIBSection2(HBITMAP bmp,INT,BOOL);
extern INT X11DRV_LockDIBSection2(HBITMAP bmp,INT,BOOL);
extern void X11DRV_UnlockDIBSection2(HBITMAP bmp,BOOL);
extern HBITMAP X11DRV_DIB_CreateDIBSection(X11DRV_PDEVICE *physDev, const BITMAPINFO *bmi, UINT usage,
VOID **bits, HANDLE section, DWORD offset, DWORD ovr_pitch);
extern void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap, struct tagBITMAPOBJ *bmp);
extern void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap);
void X11DRV_DIB_CopyDIBSection(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,
DWORD xSrc, DWORD ySrc, DWORD xDest, DWORD yDest,
DWORD width, DWORD height);
......
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