winex11: Add bitmap entry points to the XRender driver.
This commit is contained in:
parent
89d8d1d427
commit
225d8abec9
|
@ -95,9 +95,6 @@ HBITMAP X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
|
||||||
|
|
||||||
if (!GetObjectW( hbitmap, sizeof(bitmap), &bitmap )) return 0;
|
if (!GetObjectW( hbitmap, sizeof(bitmap), &bitmap )) return 0;
|
||||||
|
|
||||||
if(physDev->xrender)
|
|
||||||
X11DRV_XRender_UpdateDrawable( physDev );
|
|
||||||
|
|
||||||
if (hbitmap == BITMAP_stock_phys_bitmap.hbitmap) physBitmap = &BITMAP_stock_phys_bitmap;
|
if (hbitmap == BITMAP_stock_phys_bitmap.hbitmap) physBitmap = &BITMAP_stock_phys_bitmap;
|
||||||
else if (!(physBitmap = X11DRV_get_phys_bitmap( hbitmap ))) return 0;
|
else if (!(physBitmap = X11DRV_get_phys_bitmap( hbitmap ))) return 0;
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,6 @@ extern BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits
|
||||||
BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,
|
BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,
|
||||||
Pixmap pixmap, GC gc,
|
Pixmap pixmap, GC gc,
|
||||||
const struct bitblt_coords *src, const struct bitblt_coords *dst ) DECLSPEC_HIDDEN;
|
const struct bitblt_coords *src, const struct bitblt_coords *dst ) DECLSPEC_HIDDEN;
|
||||||
extern void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev) DECLSPEC_HIDDEN;
|
|
||||||
extern BOOL XRender_AlphaBlend( X11DRV_PDEVICE *devDst, struct bitblt_coords *dst,
|
extern BOOL XRender_AlphaBlend( X11DRV_PDEVICE *devDst, struct bitblt_coords *dst,
|
||||||
X11DRV_PDEVICE *devSrc, struct bitblt_coords *src,
|
X11DRV_PDEVICE *devSrc, struct bitblt_coords *src,
|
||||||
BLENDFUNCTION blendfn ) DECLSPEC_HIDDEN;
|
BLENDFUNCTION blendfn ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -1222,6 +1222,60 @@ static INT xrenderdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID
|
||||||
return dev->funcs->pExtEscape( dev, escape, in_count, in_data, out_count, out_data );
|
return dev->funcs->pExtEscape( dev, escape, in_count, in_data, out_count, out_data );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* xrenderdrv_CreateBitmap
|
||||||
|
*/
|
||||||
|
static BOOL xrenderdrv_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap )
|
||||||
|
{
|
||||||
|
dev = GET_NEXT_PHYSDEV( dev, pCreateBitmap );
|
||||||
|
return dev->funcs->pCreateBitmap( dev, hbitmap );
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* xrenderdrv_DeleteBitmap
|
||||||
|
*/
|
||||||
|
static BOOL xrenderdrv_DeleteBitmap( HBITMAP hbitmap )
|
||||||
|
{
|
||||||
|
return X11DRV_DeleteBitmap( hbitmap );
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* xrenderdrv_SelectBitmap
|
||||||
|
*/
|
||||||
|
static HBITMAP xrenderdrv_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
|
||||||
|
{
|
||||||
|
HBITMAP ret;
|
||||||
|
struct xrender_physdev *physdev = get_xrender_dev( dev );
|
||||||
|
|
||||||
|
dev = GET_NEXT_PHYSDEV( dev, pSelectBitmap );
|
||||||
|
ret = dev->funcs->pSelectBitmap( dev, hbitmap );
|
||||||
|
if (ret) update_xrender_drawable( physdev );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* xrenderdrv_GetImage
|
||||||
|
*/
|
||||||
|
static DWORD xrenderdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info,
|
||||||
|
struct gdi_image_bits *bits, struct bitblt_coords *src )
|
||||||
|
{
|
||||||
|
if (hbitmap) return X11DRV_GetImage( dev, hbitmap, info, bits, src );
|
||||||
|
dev = GET_NEXT_PHYSDEV( dev, pGetImage );
|
||||||
|
return dev->funcs->pGetImage( dev, hbitmap, info, bits, src );
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* xrenderdrv_PutImage
|
||||||
|
*/
|
||||||
|
static DWORD xrenderdrv_PutImage( PHYSDEV dev, HBITMAP hbitmap, HRGN clip, BITMAPINFO *info,
|
||||||
|
const struct gdi_image_bits *bits, struct bitblt_coords *src,
|
||||||
|
struct bitblt_coords *dst, DWORD rop )
|
||||||
|
{
|
||||||
|
if (hbitmap) return X11DRV_PutImage( dev, hbitmap, clip, info, bits, src, dst, rop );
|
||||||
|
dev = GET_NEXT_PHYSDEV( dev, pPutImage );
|
||||||
|
return dev->funcs->pPutImage( dev, hbitmap, clip, info, bits, src, dst, rop );
|
||||||
|
}
|
||||||
|
|
||||||
BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, const DIBSECTION *dib)
|
BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, const DIBSECTION *dib)
|
||||||
{
|
{
|
||||||
const WineXRenderFormat *fmt;
|
const WineXRenderFormat *fmt;
|
||||||
|
@ -1295,37 +1349,6 @@ BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* X11DRV_XRender_UpdateDrawable
|
|
||||||
*
|
|
||||||
* Deletes the pict and tile when the drawable changes.
|
|
||||||
*/
|
|
||||||
void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev)
|
|
||||||
{
|
|
||||||
struct xrender_info *info = physDev->xrender;
|
|
||||||
|
|
||||||
if (info->pict || info->pict_src)
|
|
||||||
{
|
|
||||||
wine_tsx11_lock();
|
|
||||||
XFlush( gdi_display );
|
|
||||||
if (info->pict)
|
|
||||||
{
|
|
||||||
TRACE("freeing pict = %lx dc = %p\n", info->pict, physDev->dev.hdc);
|
|
||||||
pXRenderFreePicture(gdi_display, info->pict);
|
|
||||||
info->pict = 0;
|
|
||||||
}
|
|
||||||
if(info->pict_src)
|
|
||||||
{
|
|
||||||
TRACE("freeing pict = %lx dc = %p\n", info->pict_src, physDev->dev.hdc);
|
|
||||||
pXRenderFreePicture(gdi_display, info->pict_src);
|
|
||||||
info->pict_src = 0;
|
|
||||||
}
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
info->format = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* UploadGlyph
|
* UploadGlyph
|
||||||
*
|
*
|
||||||
|
@ -2516,11 +2539,11 @@ static const struct gdi_dc_funcs xrender_funcs =
|
||||||
NULL, /* pChoosePixelFormat */
|
NULL, /* pChoosePixelFormat */
|
||||||
NULL, /* pChord */
|
NULL, /* pChord */
|
||||||
NULL, /* pCloseFigure */
|
NULL, /* pCloseFigure */
|
||||||
NULL, /* pCreateBitmap */
|
xrenderdrv_CreateBitmap, /* pCreateBitmap */
|
||||||
xrenderdrv_CreateCompatibleDC, /* pCreateCompatibleDC */
|
xrenderdrv_CreateCompatibleDC, /* pCreateCompatibleDC */
|
||||||
xrenderdrv_CreateDC, /* pCreateDC */
|
xrenderdrv_CreateDC, /* pCreateDC */
|
||||||
NULL, /* pCreateDIBSection */
|
NULL, /* pCreateDIBSection */
|
||||||
NULL, /* pDeleteBitmap */
|
xrenderdrv_DeleteBitmap, /* pDeleteBitmap */
|
||||||
xrenderdrv_DeleteDC, /* pDeleteDC */
|
xrenderdrv_DeleteDC, /* pDeleteDC */
|
||||||
NULL, /* pDeleteObject */
|
NULL, /* pDeleteObject */
|
||||||
NULL, /* pDescribePixelFormat */
|
NULL, /* pDescribePixelFormat */
|
||||||
|
@ -2546,7 +2569,7 @@ static const struct gdi_dc_funcs xrender_funcs =
|
||||||
NULL, /* pGetDeviceCaps */
|
NULL, /* pGetDeviceCaps */
|
||||||
NULL, /* pGetDeviceGammaRamp */
|
NULL, /* pGetDeviceGammaRamp */
|
||||||
NULL, /* pGetICMProfile */
|
NULL, /* pGetICMProfile */
|
||||||
NULL, /* pGetImage */
|
xrenderdrv_GetImage, /* pGetImage */
|
||||||
NULL, /* pGetNearestColor */
|
NULL, /* pGetNearestColor */
|
||||||
NULL, /* pGetPixel */
|
NULL, /* pGetPixel */
|
||||||
NULL, /* pGetPixelFormat */
|
NULL, /* pGetPixelFormat */
|
||||||
|
@ -2572,7 +2595,7 @@ static const struct gdi_dc_funcs xrender_funcs =
|
||||||
NULL, /* pPolygon */
|
NULL, /* pPolygon */
|
||||||
NULL, /* pPolyline */
|
NULL, /* pPolyline */
|
||||||
NULL, /* pPolylineTo */
|
NULL, /* pPolylineTo */
|
||||||
NULL, /* pPutImage */
|
xrenderdrv_PutImage, /* pPutImage */
|
||||||
NULL, /* pRealizeDefaultPalette */
|
NULL, /* pRealizeDefaultPalette */
|
||||||
NULL, /* pRealizePalette */
|
NULL, /* pRealizePalette */
|
||||||
NULL, /* pRectangle */
|
NULL, /* pRectangle */
|
||||||
|
@ -2582,7 +2605,7 @@ static const struct gdi_dc_funcs xrender_funcs =
|
||||||
NULL, /* pSaveDC */
|
NULL, /* pSaveDC */
|
||||||
NULL, /* pScaleViewportExt */
|
NULL, /* pScaleViewportExt */
|
||||||
NULL, /* pScaleWindowExt */
|
NULL, /* pScaleWindowExt */
|
||||||
NULL, /* pSelectBitmap */
|
xrenderdrv_SelectBitmap, /* pSelectBitmap */
|
||||||
NULL, /* pSelectBrush */
|
NULL, /* pSelectBrush */
|
||||||
NULL, /* pSelectClipPath */
|
NULL, /* pSelectClipPath */
|
||||||
NULL, /* pSelectFont */
|
NULL, /* pSelectFont */
|
||||||
|
@ -2659,12 +2682,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev)
|
|
||||||
{
|
|
||||||
assert(0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL XRender_AlphaBlend( X11DRV_PDEVICE *devDst, struct bitblt_coords *dst,
|
BOOL XRender_AlphaBlend( X11DRV_PDEVICE *devDst, struct bitblt_coords *dst,
|
||||||
X11DRV_PDEVICE *devSrc, struct bitblt_coords *src, BLENDFUNCTION blendfn )
|
X11DRV_PDEVICE *devSrc, struct bitblt_coords *src, BLENDFUNCTION blendfn )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue