Alexandre Julliard : winex11: Add an ExtEscape entry point in the XRender driver.
Alexandre Julliard
julliard at winehq.org
Mon Sep 12 11:42:59 CDT 2011
Module: wine
Branch: master
Commit: 89d8d1d427a322661970853026855fadc4dc317e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=89d8d1d427a322661970853026855fadc4dc317e
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Sep 12 12:04:41 2011 +0200
winex11: Add an ExtEscape entry point in the XRender driver.
---
dlls/winex11.drv/init.c | 1 -
dlls/winex11.drv/xrender.c | 31 ++++++++++++++++++++++++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index b0592fa..db430ec 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -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;
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index f5c37fe..3b931b2 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -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 */
More information about the wine-cvs
mailing list