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
{
if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE;
physdev = NULL;
depth = bitmap->pixmap_depth;
color_shifts = &bitmap->pixmap_color_shifts;
depth = bitmap->depth;
color_shifts = &bitmap->color_shifts;
}
else
{
......@@ -1853,8 +1853,8 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
{
if (!(bitmap = X11DRV_get_phys_bitmap( hbitmap ))) return ERROR_INVALID_HANDLE;
physdev = NULL;
depth = bitmap->pixmap_depth;
color_shifts = &bitmap->pixmap_color_shifts;
depth = bitmap->depth;
color_shifts = &bitmap->color_shifts;
}
else
{
......
......@@ -55,7 +55,7 @@ void X11DRV_BITMAP_Init(void)
wine_tsx11_lock();
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_gc[0] = XCreateGC( gdi_display, BITMAP_stock_phys_bitmap.pixmap, 0, NULL );
XSetGraphicsExposures( gdi_display, bitmap_gc[0], False );
......@@ -100,15 +100,15 @@ HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
physDev->bitmap = physBitmap;
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 );
physDev->dc_rect = physDev->drawable_rect;
/* 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();
XFreeGC( gdi_display, physDev->gc );
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
if (!(physBitmap = X11DRV_init_phys_bitmap( hbitmap ))) return FALSE;
physBitmap->pixmap_depth = depth;
physBitmap->depth = depth;
physBitmap->trueColor = true_color;
if (true_color) physBitmap->pixmap_color_shifts = *shifts;
if (true_color) physBitmap->color_shifts = *shifts;
wine_tsx11_lock();
physBitmap->pixmap = XCreatePixmap( gdi_display, root_window,
bitmap->bmWidth, bitmap->bmHeight, physBitmap->pixmap_depth );
bitmap->bmWidth, bitmap->bmHeight, physBitmap->depth );
if (physBitmap->pixmap)
{
GC gc = get_bitmap_gc( depth );
......
......@@ -218,7 +218,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
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();
/* Special case: a color pattern on a monochrome DC */
......@@ -237,7 +237,7 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
X11DRV_DIB_Unlock( physBitmap, TRUE );
if (physBitmap->pixmap_depth > 1)
if (physBitmap->depth > 1)
{
physDev->brush.fillStyle = FillTiled;
physDev->brush.pixel = 0; /* Ignored */
......
......@@ -3451,8 +3451,8 @@ static void X11DRV_DIB_DoCopyDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB,
descr.colorMap = colorMap;
descr.nColorMap = nColorMap;
descr.bits = dibSection.dsBm.bmBits;
descr.depth = physBitmap->pixmap_depth;
descr.shifts = physBitmap->trueColor ? &physBitmap->pixmap_color_shifts : NULL;
descr.depth = physBitmap->depth;
descr.shifts = physBitmap->trueColor ? &physBitmap->color_shifts : NULL;
descr.compression = dibSection.dsBmih.biCompression;
descr.physBitmap = physBitmap;
......@@ -3523,7 +3523,7 @@ static void X11DRV_DIB_DoUpdateDIBSection(X_PHYSBITMAP *physBitmap, BOOL toDIB)
GetObjectW( physBitmap->hbitmap, sizeof(bitmap), &bitmap );
X11DRV_DIB_DoCopyDIBSection(physBitmap, toDIB,
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);
}
......@@ -3893,13 +3893,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
{
if (dib.dsBm.bmBitsPixel == 1)
{
physBitmap->pixmap_depth = 1;
physBitmap->depth = 1;
physBitmap->trueColor = FALSE;
}
else
{
physBitmap->pixmap_depth = screen_depth;
physBitmap->pixmap_color_shifts = X11DRV_PALETTE_default_shifts;
physBitmap->depth = screen_depth;
physBitmap->color_shifts = X11DRV_PALETTE_default_shifts;
physBitmap->trueColor = (visual->class == TrueColor || visual->class == DirectColor);
}
}
......@@ -3911,7 +3911,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
if (X11DRV_DIB_QueryXShm( &pixmaps )
&& (physBitmap->image = X11DRV_XShmCreateImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight,
physBitmap->pixmap_depth, &physBitmap->shminfo )))
physBitmap->depth, &physBitmap->shminfo )))
{
if (pixmaps)
{
......@@ -3930,7 +3930,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
{
physBitmap->shm_mode = X11DRV_SHM_NONE;
physBitmap->image = X11DRV_DIB_CreateXImage( dib.dsBm.bmWidth, dib.dsBm.bmHeight,
physBitmap->pixmap_depth );
physBitmap->depth );
}
#ifdef HAVE_LIBXXSHM
......@@ -3940,13 +3940,13 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
physBitmap->pixmap = XShmCreatePixmap( gdi_display, root_window,
physBitmap->shminfo.shmaddr, &physBitmap->shminfo,
dib.dsBm.bmWidth, dib.dsBm.bmHeight,
physBitmap->pixmap_depth );
physBitmap->depth );
}
else
#endif
{
physBitmap->pixmap = XCreatePixmap( gdi_display, root_window, dib.dsBm.bmWidth,
dib.dsBm.bmHeight, physBitmap->pixmap_depth );
dib.dsBm.bmHeight, physBitmap->depth );
}
wine_tsx11_unlock();
......@@ -3954,7 +3954,7 @@ HBITMAP X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *bmi,
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
* 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
vis = pglXGetVisualFromFBConfig(gdi_display, fmt->fbconfig);
if(vis) {
if(vis->depth == physDev->bitmap->pixmap_depth)
if(vis->depth == physDev->bitmap->depth)
ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap);
XFree(vis);
}
......
......@@ -118,8 +118,8 @@ typedef struct
HBITMAP hbitmap;
Pixmap pixmap;
XID glxpixmap;
int pixmap_depth;
ColorShifts pixmap_color_shifts;
int depth; /* depth of the X pixmap */
ColorShifts color_shifts; /* color shifts of the X pixmap */
/* the following fields are only used for DIB section bitmaps */
int status, p_status; /* mapping status */
XImage *image; /* cached XImage */
......
......@@ -1345,9 +1345,9 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel,
return FALSE;
}
physBitmap->pixmap_depth = pict_format->depth;
physBitmap->depth = pict_format->depth;
physBitmap->trueColor = TRUE;
physBitmap->pixmap_color_shifts = shifts;
physBitmap->color_shifts = shifts;
return TRUE;
}
......@@ -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;
physdev = NULL;
dst_format = get_xrender_format_from_color_shifts( bitmap->pixmap_depth,
&bitmap->pixmap_color_shifts );
dst_format = get_xrender_format_from_color_shifts( bitmap->depth, &bitmap->color_shifts );
}
else
{
......@@ -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)
{
/* 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;
enum wxr_format src_format = get_xrender_format_from_color_shifts(physBitmap->pixmap_depth, &physBitmap->pixmap_color_shifts);
int depth = physBitmap->depth == 1 ? 1 : physDev->depth;
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);
wine_tsx11_lock();
physDev->brush.pixmap = XCreatePixmap(gdi_display, root_window, width, height, depth);
/* 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) )
{
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 */
{
......
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