Henri Verbeet : wined3d: Get rid of holdbitmap from wineD3DSurface_DIB.
Alexandre Julliard
julliard at winehq.org
Tue Nov 8 12:23:09 CST 2011
Module: wine
Branch: master
Commit: 896aaa67ca28d2a40ce21a92f14776f80f29de89
URL: http://source.winehq.org/git/wine.git/?a=commit;h=896aaa67ca28d2a40ce21a92f14776f80f29de89
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Nov 7 21:19:58 2011 +0100
wined3d: Get rid of holdbitmap from wineD3DSurface_DIB.
---
dlls/wined3d/device.c | 3 ---
dlls/wined3d/surface.c | 7 +------
dlls/wined3d/wined3d_private.h | 1 -
3 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 05a0ad8..b271f5b 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5220,10 +5220,7 @@ static HRESULT updateSurfaceDesc(struct wined3d_surface *surface,
/* Reallocate proper memory for the front and back buffer and adjust their sizes */
if (surface->flags & SFLAG_DIBSECTION)
{
- /* Release the DC */
- SelectObject(surface->hDC, surface->dib.holdbitmap);
DeleteDC(surface->hDC);
- /* Release the DIB section */
DeleteObject(surface->dib.DIBsection);
surface->dib.bitmap_data = NULL;
surface->resource.allocatedMemory = NULL;
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 4529ad0..7af21b4 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -97,10 +97,7 @@ static void surface_cleanup(struct wined3d_surface *surface)
if (surface->flags & SFLAG_DIBSECTION)
{
- /* Release the DC. */
- SelectObject(surface->hDC, surface->dib.holdbitmap);
DeleteDC(surface->hDC);
- /* Release the DIB section. */
DeleteObject(surface->dib.DIBsection);
surface->dib.bitmap_data = NULL;
surface->resource.allocatedMemory = NULL;
@@ -511,7 +508,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
/* Now allocate a DC. */
surface->hDC = CreateCompatibleDC(0);
- surface->dib.holdbitmap = SelectObject(surface->hDC, surface->dib.DIBsection);
+ SelectObject(surface->hDC, surface->dib.DIBsection);
TRACE("Using wined3d palette %p.\n", surface->palette);
SelectPalette(surface->hDC, surface->palette ? surface->palette->hpal : 0, FALSE);
@@ -3139,9 +3136,7 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem
/* Do I have to copy the old surface content? */
if (surface->flags & SFLAG_DIBSECTION)
{
- SelectObject(surface->hDC, surface->dib.holdbitmap);
DeleteDC(surface->hDC);
- /* Release the DIB section. */
DeleteObject(surface->dib.DIBsection);
surface->dib.bitmap_data = NULL;
surface->resource.allocatedMemory = NULL;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 2e3fef1..e81ff88 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1949,7 +1949,6 @@ typedef struct wineD3DSurface_DIB {
HBITMAP DIBsection;
void* bitmap_data;
UINT bitmap_size;
- HGDIOBJ holdbitmap;
BOOL client_memory;
} wineD3DSurface_DIB;
More information about the wine-cvs
mailing list