Commit 46f1d2a4 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Remove redundant pixmap prefix in X_PHYSBITMAP field names.

parent f3f315ed
...@@ -1710,8 +1710,8 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info ...@@ -1710,8 +1710,8 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info
{ {
if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE; if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE;
physdev = NULL; physdev = NULL;
depth = bitmap->pixmap_depth; depth = bitmap->depth;
color_shifts = &bitmap->pixmap_color_shifts; color_shifts = &bitmap->color_shifts;
} }
else else
{ {
...@@ -1853,8 +1853,8 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, ...@@ -1853,8 +1853,8 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
{ {
if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE; if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE;
physdev = NULL; physdev = NULL;
depth = bitmap->pixmap_depth; depth = bitmap->depth;
color_shifts = &bitmap->pixmap_color_shifts; color_shifts = &bitmap->color_shifts;
} }
else else
{ {
......
...@@ -55,7 +55,7 @@ void X11DRV_BITMAP_Init(void) ...@@ -55,7 +55,7 @@ void X11DRV_BITMAP_Init(void)
wine_tsx11_lock(); wine_tsx11_lock();
bitmap_context = XUniqueContext(); bitmap_context = XUniqueContext();
BITMAP_stock_phys_bitmap.pixmap_depth = 1; BITMAP_stock_phys_bitmap.depth = 1;
BITMAP_stock_phys_bitmap.pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, 1 ); BITMAP_stock_phys_bitmap.pixmap = XCreatePixmap( gdi_display, root_window, 1, 1, 1 );
bitmap_gc[0] = XCreateGC( gdi_display, BITMAP_stock_phys_bitmap.pixmap, 0, NULL ); bitmap_gc[0] = XCreateGC( gdi_display, BITMAP_stock_phys_bitmap.pixmap, 0, NULL );
XSetGraphicsExposures( gdi_display, bitmap_gc[0], False ); XSetGraphicsExposures( gdi_display, bitmap_gc[0], False );
...@@ -100,15 +100,15 @@ HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap ) ...@@ -100,15 +100,15 @@ HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
physDev->bitmap = physBitmap; physDev->bitmap = physBitmap;
physDev->drawable = physBitmap->pixmap; physDev->drawable = physBitmap->pixmap;
physDev->color_shifts = physBitmap->trueColor ? &physBitmap->pixmap_color_shifts : NULL; physDev->color_shifts = physBitmap->trueColor ? &physBitmap->color_shifts : NULL;
SetRect( &physDev->drawable_rect, 0, 0, bitmap.bmWidth, bitmap.bmHeight ); SetRect( &physDev->drawable_rect, 0, 0, bitmap.bmWidth, bitmap.bmHeight );
physDev->dc_rect = physDev->drawable_rect; physDev->dc_rect = physDev->drawable_rect;
/* Change GC depth if needed */ /* Change GC depth if needed */
if (physDev->depth != physBitmap->pixmap_depth) if (physDev->depth != physBitmap->depth)
{ {
physDev->depth = physBitmap->pixmap_depth; physDev->depth = physBitmap->depth;
wine_tsx11_lock(); wine_tsx11_lock();
XFreeGC( gdi_display, physDev->gc ); XFreeGC( gdi_display, physDev->gc );
physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL ); physDev->gc = XCreateGC( gdi_display, physDev->drawable, 0, NULL );
...@@ -132,13 +132,13 @@ BOOL X11DRV_create_phys_bitmap( HBITMAP hbitmap, const BITMAP *bitmap, int depth ...@@ -132,13 +132,13 @@ BOOL X11DRV_create_phys_bitmap( HBITMAP hbitmap, const BITMAP *bitmap, int depth
if (!(physBitmap = X11DRV_init_phys_bitmap( hbitmap ))) return FALSE; if (!(physBitmap = X11DRV_init_phys_bitmap( hbitmap ))) return FALSE;
physBitmap->pixmap_depth = depth; physBitmap->depth = depth;
physBitmap->trueColor = true_color; physBitmap->trueColor = true_color;
if (true_color) physBitmap->pixmap_color_shifts = *shifts; if (true_color) physBitmap->color_shifts = *shifts;
wine_tsx11_lock(); wine_tsx11_lock();
physBitmap->pixmap = XCreatePixmap( gdi_display, root_window, physBitmap->pixmap = XCreatePixmap( gdi_display, root_window,
bitmap->bmWidth, bitmap->bmHeight, physBitmap->pixmap_depth ); bitmap->bmWidth, bitmap->bmHeight, physBitmap->depth );
if (physBitmap->pixmap) if (physBitmap->pixmap)
{ {
GC gc = get_bitmap_gc( depth ); GC gc = get_bitmap_gc( depth );
......
...@@ -218,7 +218,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) ...@@ -218,7 +218,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod ); X11DRV_DIB_Lock( physBitmap, DIB_Status_GdiMod );
if ((physDev->depth == 1) && (physBitmap->pixmap_depth != 1)) if ((physDev->depth == 1) && (physBitmap->depth != 1))
{ {
wine_tsx11_lock(); wine_tsx11_lock();
/* Special case: a color pattern on a monochrome DC */ /* Special case: a color pattern on a monochrome DC */
...@@ -237,7 +237,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap ) ...@@ -237,7 +237,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
X11DRV_DIB_Unlock( physBitmap, TRUE ); X11DRV_DIB_Unlock( physBitmap, TRUE );
if (physBitmap->pixmap_depth > 1) if (physBitmap->depth > 1)
{ {
physDev->brush.fillStyle = FillTiled; physDev->brush.fillStyle = FillTiled;
physDev->brush.pixel = 0; /* Ignored */ physDev->brush.pixel = 0; /* Ignored */
......
...@@ -3451,8 +3451,8 @@ static void X11DRV_DIB_DoCopyDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB, ...@@ -3451,8 +3451,8 @@ static void X11DRV_DIB_DoCopyDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB,
descr.colorMap = colorMap; descr.colorMap = colorMap;
descr.nColorMap = nColorMap; descr.nColorMap = nColorMap;
descr.bits = dibSection.dsBm.bmBits; descr.bits = dibSection.dsBm.bmBits;
descr.depth = physBitmap->pixmap_depth; descr.depth = physBitmap->depth;
descr.shifts = physBitmap->trueColor ? &physBitmap->pixmap_color_shifts : NULL; descr.shifts = physBitmap->trueColor ? &physBitmap->color_shifts : NULL;
descr.compression = dibSection.dsBmih.biCompression; descr.compression = dibSection.dsBmih.biCompression;
descr.physBitmap = physBitmap; descr.physBitmap = physBitmap;
...@@ -3523,7 +3523,7 @@ static void X11DRV_DIB_DoUpdateDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB) ...@@ -3523,7 +3523,7 @@ static void X11DRV_DIB_DoUpdateDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB)
GetObjectW( physBitmap->hbitmap, sizeof(bitmap), &bitmap ); GetObjectW( physBitmap->hbitmap, sizeof(bitmap), &bitmap );
X11DRV_DIB_DoCopyDIBSection(physBitmap, toDIB, X11DRV_DIB_DoCopyDIBSection(physBitmap, toDIB,
physBitmap->colorMap, physBitmap->nColorMap, physBitmap->colorMap, physBitmap->nColorMap,
physBitmap->pixmap, get_bitmap_gc(physBitmap->pixmap_depth), physBitmap->pixmap, get_bitmap_gc(physBitmap->depth),
0, 0, 0, 0, bitmap.bmWidth, bitmap.bmHeight); 0, 0, 0, 0, bitmap.bmWidth, bitmap.bmHeight);
} }
...@@ -3893,13 +3893,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi, ...@@ -3893,13 +3893,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
{ {
if (dib.dsBm.bmBitsPixel == 1) if (dib.dsBm.bmBitsPixel == 1)
{ {
physBitmap->pixmap_depth = 1; physBitmap->depth = 1;
physBitmap->trueColor = FALSE; physBitmap->trueColor = FALSE;
} }
else else
{ {
physBitmap->pixmap_depth = screen_depth; physBitmap->depth = screen_depth;
physBitmap->pixmap_color_shifts = X11DRV_PALETTE_default_shifts; physBitmap->color_shifts = X11DRV_PALETTE_default_shifts;
physBitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor); physBitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor);
} }
} }
...@@ -3911,7 +3911,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi, ...@@ -3911,7 +3911,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
if (X11DRV_DIB_QueryXShm( &pixmaps ) if (X11DRV_DIB_QueryXShm( &pixmaps )
&& (physBitmap->image = X11DRV_XShmCreateImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight, && (physBitmap->image = X11DRV_XShmCreateImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight,
physBitmap->pixmap_depth, &physBitmap->shminfo ))) physBitmap->depth, &physBitmap->shminfo )))
{ {
if (pixmaps) if (pixmaps)
{ {
...@@ -3930,7 +3930,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi, ...@@ -3930,7 +3930,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
{ {
physBitmap->shm_mode = X11DRV_SHM_NONE; physBitmap->shm_mode = X11DRV_SHM_NONE;
physBitmap->image = X11DRV_DIB_CreateXImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight, physBitmap->image = X11DRV_DIB_CreateXImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight,
physBitmap->pixmap_depth ); physBitmap->depth );
} }
#ifdef HAVE_LIBXXSHM #ifdef HAVE_LIBXXSHM
...@@ -3940,13 +3940,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi, ...@@ -3940,13 +3940,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
physBitmap->pixmap = XShmCreatePixmap( gdi_display, root_window, physBitmap->pixmap = XShmCreatePixmap( gdi_display, root_window,
physBitmap->shminfo.shmaddr, &physBitmap->shminfo, physBitmap->shminfo.shmaddr, &physBitmap->shminfo,
dib.dsBm.bmWidth, dib.dsBm.bmHeight, dib.dsBm.bmWidth, dib.dsBm.bmHeight,
physBitmap->pixmap_depth ); physBitmap->depth );
} }
else else
#endif #endif
{ {
physBitmap->pixmap = XCreatePixmap( gdi_display, root_window, dib.dsBm.bmWidth, physBitmap->pixmap = XCreatePixmap( gdi_display, root_window, dib.dsBm.bmWidth,
dib.dsBm.bmHeight, physBitmap->pixmap_depth ); dib.dsBm.bmHeight, physBitmap->depth );
} }
wine_tsx11_unlock(); wine_tsx11_unlock();
...@@ -3954,7 +3954,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi, ...@@ -3954,7 +3954,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
if (physBitmap->trueColor) if (physBitmap->trueColor)
{ {
ColorShifts *shifts = &physBitmap->pixmap_color_shifts; ColorShifts *shifts = &physBitmap->color_shifts;
/* When XRender is around and used, we also support dibsections in other formats like 16-bit. In these /* When XRender is around and used, we also support dibsections in other formats like 16-bit. In these
* cases we need to override the mask of XImages. The reason is that during XImage creation the masks are * cases we need to override the mask of XImages. The reason is that during XImage creation the masks are
......
...@@ -1185,7 +1185,7 @@ static XID create_bitmap_glxpixmap(X11DRV_PDEVICE *physDev, WineGLPixelFormat *f ...@@ -1185,7 +1185,7 @@ static XID create_bitmap_glxpixmap(X11DRV_PDEVICE *physDev, WineGLPixelFormat *f
vis = pglXGetVisualFromFBConfig(gdi_display, fmt->fbconfig); vis = pglXGetVisualFromFBConfig(gdi_display, fmt->fbconfig);
if(vis) { if(vis) {
if(vis->depth == physDev->bitmap->pixmap_depth) if(vis->depth == physDev->bitmap->depth)
ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap); ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap);
XFree(vis); XFree(vis);
} }
......
...@@ -118,8 +118,8 @@ typedef struct ...@@ -118,8 +118,8 @@ typedef struct
HBITMAP hbitmap; HBITMAP hbitmap;
Pixmap pixmap; Pixmap pixmap;
XID glxpixmap; XID glxpixmap;
int pixmap_depth; int depth; /* depth of the X pixmap */
ColorShifts pixmap_color_shifts; ColorShifts color_shifts; /* color shifts of the X pixmap */
/* the following fields are only used for DIB section bitmaps */ /* the following fields are only used for DIB section bitmaps */
int status, p_status; /* mapping status */ int status, p_status; /* mapping status */
XImage *image; /* cached XImage */ XImage *image; /* cached XImage */
......
...@@ -1345,9 +1345,9 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, ...@@ -1345,9 +1345,9 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel,
return FALSE; return FALSE;
} }
physBitmap->pixmap_depth = pict_format->depth; physBitmap->depth = pict_format->depth;
physBitmap->trueColor = TRUE; physBitmap->trueColor = TRUE;
physBitmap->pixmap_color_shifts = shifts; physBitmap->color_shifts = shifts;
return TRUE; return TRUE;
} }
...@@ -2694,8 +2694,7 @@ static DWORD xrenderdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMA ...@@ -2694,8 +2694,7 @@ static DWORD xrenderdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMA
{ {
if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE; if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE;
physdev = NULL; physdev = NULL;
dst_format = get_xrender_format_from_color_shifts( bitmap->pixmap_depth, dst_format = get_xrender_format_from_color_shifts( bitmap->depth, &bitmap->color_shifts );
&bitmap->pixmap_color_shifts );
} }
else else
{ {
...@@ -2980,19 +2979,19 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst, ...@@ -2980,19 +2979,19 @@ static BOOL xrenderdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
void X11DRV_XRender_CopyBrush(X11DRV_PDEVICE *physDev, X_PHYSBITMAP *physBitmap, int width, int height) void X11DRV_XRender_CopyBrush(X11DRV_PDEVICE *physDev, X_PHYSBITMAP *physBitmap, int width, int height)
{ {
/* At depths >1, the depth of physBitmap and physDev might not be the same e.g. the physbitmap might be a 16-bit DIB while the physdev uses 24-bit */ /* At depths >1, the depth of physBitmap and physDev might not be the same e.g. the physbitmap might be a 16-bit DIB while the physdev uses 24-bit */
int depth = physBitmap->pixmap_depth == 1 ? 1 : physDev->depth; int depth = physBitmap->depth == 1 ? 1 : physDev->depth;
enum wxr_format src_format = get_xrender_format_from_color_shifts(physBitmap->pixmap_depth, &physBitmap->pixmap_color_shifts); enum wxr_format src_format = get_xrender_format_from_color_shifts(physBitmap->depth, &physBitmap->color_shifts);
enum wxr_format dst_format = get_xrender_format_from_color_shifts(physDev->depth, physDev->color_shifts); enum wxr_format dst_format = get_xrender_format_from_color_shifts(physDev->depth, physDev->color_shifts);
wine_tsx11_lock(); wine_tsx11_lock();
physDev->brush.pixmap = XCreatePixmap(gdi_display, root_window, width, height, depth); physDev->brush.pixmap = XCreatePixmap(gdi_display, root_window, width, height, depth);
/* Use XCopyArea when the physBitmap and brush.pixmap have the same format. */ /* Use XCopyArea when the physBitmap and brush.pixmap have the same format. */
if( (physBitmap->pixmap_depth == 1) || (!X11DRV_XRender_Installed && physDev->depth == physBitmap->pixmap_depth) || if( (physBitmap->depth == 1) || (!X11DRV_XRender_Installed && physDev->depth == physBitmap->depth) ||
(src_format == dst_format) ) (src_format == dst_format) )
{ {
XCopyArea( gdi_display, physBitmap->pixmap, physDev->brush.pixmap, XCopyArea( gdi_display, physBitmap->pixmap, physDev->brush.pixmap,
get_bitmap_gc(physBitmap->pixmap_depth), 0, 0, width, height, 0, 0 ); get_bitmap_gc(physBitmap->depth), 0, 0, width, height, 0, 0 );
} }
else /* We need depth conversion */ else /* We need depth conversion */
{ {
......
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