Commit 896aaa67 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of holdbitmap from wineD3DSurface_DIB.

parent 604d1540
......@@ -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;
......
......@@ -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;
......
......@@ -1949,7 +1949,6 @@ typedef struct wineD3DSurface_DIB {
HBITMAP DIBsection;
void* bitmap_data;
UINT bitmap_size;
HGDIOBJ holdbitmap;
BOOL client_memory;
} wineD3DSurface_DIB;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment