Roderick Colenbrander : winex11: Check format in XRender_GetSrcAreaStretch instead of depth.
Alexandre Julliard
julliard at winehq.org
Fri Oct 30 11:04:34 CDT 2009
Module: wine
Branch: master
Commit: f8786eacb7cb886afdd068e8cfd19200459faa9b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8786eacb7cb886afdd068e8cfd19200459faa9b
Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date: Fri Oct 30 11:21:32 2009 +0100
winex11: Check format in XRender_GetSrcAreaStretch instead of depth.
---
dlls/winex11.drv/xrender.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 06b2aa6..005296b 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -2103,6 +2103,7 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
int height = visRectDst->bottom - visRectDst->top;
int x_src = physDevSrc->dc_rect.left + visRectSrc->left;
int y_src = physDevSrc->dc_rect.top + visRectSrc->top;
+ struct xrender_info *src_info = get_xrender_info(physDevSrc);
const WineXRenderFormat *dst_format = get_xrender_format_from_color_shifts(physDevDst->depth, physDevDst->color_shifts);
Picture src_pict=0, dst_pict=0, mask_pict=0;
@@ -2130,8 +2131,8 @@ BOOL X11DRV_XRender_GetSrcAreaStretch(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE
if((physDevDst->depth == 1) && (physDevSrc->depth > 1))
return FALSE;
- /* Just use traditional X copy when the depths match and we don't need stretching */
- if((physDevSrc->depth == physDevDst->depth) && !stretch)
+ /* Just use traditional X copy when the formats match and we don't need stretching */
+ if((src_info->format->format == dst_format->format) && !stretch)
{
TRACE("Source and destination depth match and no stretching needed falling back to XCopyArea\n");
wine_tsx11_lock();
More information about the wine-cvs
mailing list