winex11: Add an ExtEscape entry point in the XRender driver.

This commit is contained in:
Alexandre Julliard 2011-09-12 12:04:41 +02:00
parent b74a33d9b3
commit 89d8d1d427
2 changed files with 30 additions and 2 deletions

View File

@ -358,7 +358,6 @@ static INT X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_d
if (in_count >= sizeof(struct x11drv_escape_set_drawable))
{
const struct x11drv_escape_set_drawable *data = in_data;
if(physDev->xrender) X11DRV_XRender_UpdateDrawable( physDev );
physDev->dc_rect = data->dc_rect;
physDev->drawable = data->drawable;
physDev->drawable_rect = data->drawable_rect;

View File

@ -646,6 +646,13 @@ static void free_xrender_picture( struct xrender_physdev *dev )
dev->info.format = NULL;
}
static void update_xrender_drawable( struct xrender_physdev *dev )
{
free_xrender_picture( dev );
dev->info.format = get_xrender_format_from_color_shifts( dev->x11dev->depth,
dev->x11dev->color_shifts );
}
/* return a mask picture used to force alpha to 0 */
static Picture get_no_alpha_mask(void)
{
@ -1193,6 +1200,28 @@ static BOOL xrenderdrv_DeleteDC( PHYSDEV dev )
return TRUE;
}
/**********************************************************************
* xrenderdrv_ExtEscape
*/
static INT xrenderdrv_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_data,
INT out_count, LPVOID out_data )
{
struct xrender_physdev *physdev = get_xrender_dev( dev );
dev = GET_NEXT_PHYSDEV( dev, pExtEscape );
if (escape == X11DRV_ESCAPE && in_data && in_count >= sizeof(enum x11drv_escape_codes))
{
if (*(const enum x11drv_escape_codes *)in_data == X11DRV_SET_DRAWABLE)
{
BOOL ret = dev->funcs->pExtEscape( dev, escape, in_count, in_data, out_count, out_data );
if (ret) update_xrender_drawable( physdev );
return ret;
}
}
return dev->funcs->pExtEscape( dev, escape, in_count, in_data, out_count, out_data );
}
BOOL X11DRV_XRender_SetPhysBitmapDepth(X_PHYSBITMAP *physBitmap, int bits_pixel, const DIBSECTION *dib)
{
const WineXRenderFormat *fmt;
@ -2504,7 +2533,7 @@ static const struct gdi_dc_funcs xrender_funcs =
NULL, /* pEnumICMProfiles */
NULL, /* pExcludeClipRect */
NULL, /* pExtDeviceMode */
NULL, /* pExtEscape */
xrenderdrv_ExtEscape, /* pExtEscape */
NULL, /* pExtFloodFill */
NULL, /* pExtSelectClipRgn */
NULL, /* pExtTextOut */