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