Commit 543a199d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Only store dc_info for textures that require it.

parent 082abe4a
...@@ -549,7 +549,7 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai ...@@ -549,7 +549,7 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai
TRACE("swapchain %p.\n", swapchain); TRACE("swapchain %p.\n", swapchain);
front = swapchain->front_buffer->sub_resources[0].dc_info; front = &swapchain->front_buffer->dc_info[0];
if (swapchain->palette) if (swapchain->palette)
wined3d_palette_apply_to_dc(swapchain->palette, front->dc); wined3d_palette_apply_to_dc(swapchain->palette, front->dc);
...@@ -589,8 +589,8 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, ...@@ -589,8 +589,8 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain,
void *data; void *data;
HDC dc; HDC dc;
front = swapchain->front_buffer->sub_resources[0].dc_info; front = &swapchain->front_buffer->dc_info[0];
back = swapchain->back_buffers[0]->sub_resources[0].dc_info; back = &swapchain->back_buffers[0]->dc_info[0];
/* Flip the surface data. */ /* Flip the surface data. */
dc = front->dc; dc = front->dc;
......
...@@ -3090,7 +3090,6 @@ struct wined3d_texture_ops ...@@ -3090,7 +3090,6 @@ struct wined3d_texture_ops
struct wined3d_context *context, DWORD location); struct wined3d_context *context, DWORD location);
void (*texture_prepare_texture)(struct wined3d_texture *texture, void (*texture_prepare_texture)(struct wined3d_texture *texture,
struct wined3d_context *context, BOOL srgb); struct wined3d_context *context, BOOL srgb);
void (*texture_cleanup_sub_resources)(struct wined3d_texture *texture);
}; };
#define WINED3D_TEXTURE_COND_NP2 0x00000001 #define WINED3D_TEXTURE_COND_NP2 0x00000001
...@@ -3162,6 +3161,12 @@ struct wined3d_texture ...@@ -3162,6 +3161,12 @@ struct wined3d_texture
RECT dst_rect; RECT dst_rect;
} *overlay_info; } *overlay_info;
struct wined3d_dc_info
{
HBITMAP bitmap;
HDC dc;
} *dc_info;
struct list renderbuffers; struct list renderbuffers;
const struct wined3d_renderbuffer_entry *current_renderbuffer; const struct wined3d_renderbuffer_entry *current_renderbuffer;
...@@ -3170,11 +3175,6 @@ struct wined3d_texture ...@@ -3170,11 +3175,6 @@ struct wined3d_texture
void *parent; void *parent;
const struct wined3d_parent_ops *parent_ops; const struct wined3d_parent_ops *parent_ops;
struct wined3d_dc_info
{
HBITMAP bitmap;
HDC dc;
} *dc_info;
unsigned int offset; unsigned int offset;
unsigned int size; unsigned int size;
......
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