From 7dc8f48ef87b2f8124b6a0fe1badb9c8a33e5da6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 21 Jul 2011 12:03:30 +0200 Subject: [PATCH] gdi32: Get rid of the offset in the gdi_image_bits structure now that we are passing the full rectangles. --- dlls/gdi32/bitblt.c | 1 - dlls/winex11.drv/bitblt.c | 5 +---- include/wine/gdi_driver.h | 11 +++++------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index 48a70bd0568..a1dcc7a726c 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -253,7 +253,6 @@ try_get_image: if (bits.free) bits.free( &bits ); bits.ptr = ptr; bits.is_copy = TRUE; - bits.offset = 0; bits.free = free_heap_bits; if (!err) { diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 5699911d4fe..62a10cc4419 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1761,7 +1761,6 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, info->bmiHeader.biSizeImage = height * width_bytes; if (!(dst_bits->ptr = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) return ERROR_OUTOFMEMORY; - dst_bits->offset = src_bits->offset; dst_bits->is_copy = TRUE; dst_bits->free = free_heap_bits; } @@ -1769,7 +1768,6 @@ static DWORD copy_image_bits( BITMAPINFO *info, const ColorShifts *color_shifts, { /* swap bits in place */ dst_bits->ptr = src; - dst_bits->offset = src_bits->offset; dst_bits->is_copy = src_bits->is_copy; dst_bits->free = NULL; if (!need_byteswap && zeropad_mask == ~0u && !mapping) return ERROR_SUCCESS; /* nothing to do */ @@ -2029,8 +2027,7 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, FIXME( "depth %u bpp %u not supported yet\n", depth, format->bits_per_pixel ); return ERROR_BAD_FORMAT; } - src_bits.offset = src->visrect.left & (align - 1); - x = src->visrect.left - src_bits.offset; + x = src->visrect.left & ~(align - 1); y = src->visrect.top; width = src->visrect.right - x; height = src->visrect.bottom - src->visrect.top; diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index b4166bf1047..c02ce9b1a04 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -46,11 +46,10 @@ struct bitblt_coords struct gdi_image_bits { - void *ptr; /* pointer to the bits */ - unsigned int offset; /* x offset of first requested pixel */ - BOOL is_copy; /* whether this is a copy of the bits that can be modified */ - void (*free)(struct gdi_image_bits *); /* callback for freeing the bits */ - void *param; /* extra parameter for callback private use */ + void *ptr; /* pointer to the bits */ + BOOL is_copy; /* whether this is a copy of the bits that can be modified */ + void (*free)(struct gdi_image_bits *); /* callback for freeing the bits */ + void *param; /* extra parameter for callback private use */ }; struct gdi_dc_funcs @@ -192,7 +191,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 5 +#define WINE_GDI_DRIVER_VERSION 6 static inline PHYSDEV get_physdev_entry_point( PHYSDEV dev, size_t offset ) {