Module: wine Branch: master Commit: 55bc21938f5109c8bec7e59acbdcfb55b6fb4748 URL: http://source.winehq.org/git/wine.git/?a=commit;h=55bc21938f5109c8bec7e59acb...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Jul 15 19:57:31 2011 +0200
winex11: Don't access the source rectangle in PutImage until needed.
---
dlls/winex11.drv/bitblt.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 880d71f..73ab7e8 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1802,8 +1802,6 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str struct gdi_image_bits dst_bits; const XPixmapFormatValues *format; const ColorShifts *color_shifts; - int width = rect->right - rect->left; - int height = rect->bottom - rect->top;
if (hbitmap) { @@ -1866,6 +1864,9 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str
if (!ret) { + int width = rect->right - rect->left; + int height = rect->bottom - rect->top; + image->data = dst_bits.ptr; if (bitmap) {