Commit 48b6050c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove surface_preload from wined3d_surface_ops.

parent 64d883a3
...@@ -849,13 +849,6 @@ static HRESULT surface_draw_overlay(struct wined3d_surface *surface) ...@@ -849,13 +849,6 @@ static HRESULT surface_draw_overlay(struct wined3d_surface *surface)
return hr; return hr;
} }
static void surface_preload(struct wined3d_surface *surface)
{
TRACE("surface %p.\n", surface);
surface_internal_preload(surface, SRGB_ANY);
}
static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags) static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags)
{ {
struct wined3d_device *device = surface->resource.device; struct wined3d_device *device = surface->resource.device;
...@@ -1916,7 +1909,6 @@ static const struct wined3d_surface_ops surface_ops = ...@@ -1916,7 +1909,6 @@ static const struct wined3d_surface_ops surface_ops =
surface_private_setup, surface_private_setup,
surface_realize_palette, surface_realize_palette,
surface_draw_overlay, surface_draw_overlay,
surface_preload,
surface_map, surface_map,
surface_unmap, surface_unmap,
}; };
...@@ -2009,13 +2001,6 @@ static HRESULT gdi_surface_draw_overlay(struct wined3d_surface *surface) ...@@ -2009,13 +2001,6 @@ static HRESULT gdi_surface_draw_overlay(struct wined3d_surface *surface)
return E_FAIL; return E_FAIL;
} }
static void gdi_surface_preload(struct wined3d_surface *surface)
{
TRACE("surface %p.\n", surface);
ERR("Preloading GDI surfaces is not supported.\n");
}
static void gdi_surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags) static void gdi_surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags)
{ {
TRACE("surface %p, rect %s, flags %#x.\n", TRACE("surface %p, rect %s, flags %#x.\n",
...@@ -2052,7 +2037,6 @@ static const struct wined3d_surface_ops gdi_surface_ops = ...@@ -2052,7 +2037,6 @@ static const struct wined3d_surface_ops gdi_surface_ops =
gdi_surface_private_setup, gdi_surface_private_setup,
gdi_surface_realize_palette, gdi_surface_realize_palette,
gdi_surface_draw_overlay, gdi_surface_draw_overlay,
gdi_surface_preload,
gdi_surface_map, gdi_surface_map,
gdi_surface_unmap, gdi_surface_unmap,
}; };
...@@ -2947,7 +2931,13 @@ void CDECL wined3d_surface_preload(struct wined3d_surface *surface) ...@@ -2947,7 +2931,13 @@ void CDECL wined3d_surface_preload(struct wined3d_surface *surface)
{ {
TRACE("surface %p.\n", surface); TRACE("surface %p.\n", surface);
surface->surface_ops->surface_preload(surface); if (!surface->resource.device->d3d_initialized)
{
ERR("D3D not initialized.\n");
return;
}
surface_internal_preload(surface, SRGB_ANY);
} }
void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface) void * CDECL wined3d_surface_get_parent(const struct wined3d_surface *surface)
......
...@@ -2002,7 +2002,6 @@ struct wined3d_surface_ops ...@@ -2002,7 +2002,6 @@ struct wined3d_surface_ops
HRESULT (*surface_private_setup)(struct wined3d_surface *surface); HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
void (*surface_realize_palette)(struct wined3d_surface *surface); void (*surface_realize_palette)(struct wined3d_surface *surface);
HRESULT (*surface_draw_overlay)(struct wined3d_surface *surface); HRESULT (*surface_draw_overlay)(struct wined3d_surface *surface);
void (*surface_preload)(struct wined3d_surface *surface);
void (*surface_map)(struct wined3d_surface *surface, const RECT *rect, DWORD flags); void (*surface_map)(struct wined3d_surface *surface, const RECT *rect, DWORD flags);
void (*surface_unmap)(struct wined3d_surface *surface); void (*surface_unmap)(struct wined3d_surface *surface);
}; };
......
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