wined3d: Get rid of holdbitmap from wineD3DSurface_DIB.
This commit is contained in:
parent
604d154002
commit
896aaa67ca
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue