Alexandre Julliard : gdi32: Get rid of the offset in the gdi_image_bits structure now that we are passing the full rectangles .
Alexandre Julliard
julliard at winehq.org
Thu Jul 21 10:50:49 CDT 2011
Module: wine
Branch: master
Commit: 7dc8f48ef87b2f8124b6a0fe1badb9c8a33e5da6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7dc8f48ef87b2f8124b6a0fe1badb9c8a33e5da6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jul 21 12:03:30 2011 +0200
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 48a70bd..a1dcc7a 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 5699911..62a10cc 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 b4166bf..c02ce9b 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 )
{
More information about the wine-cvs
mailing list