wined3d: Remove surface_preload from wined3d_surface_ops.

This commit is contained in:
Henri Verbeet 2011-11-06 22:05:55 +01:00 committed by Alexandre Julliard
parent 64d883a356
commit 48b6050ca3
2 changed files with 7 additions and 18 deletions

View File

@ -849,13 +849,6 @@ static HRESULT surface_draw_overlay(struct wined3d_surface *surface)
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)
{
struct wined3d_device *device = surface->resource.device;
@ -1916,7 +1909,6 @@ static const struct wined3d_surface_ops surface_ops =
surface_private_setup,
surface_realize_palette,
surface_draw_overlay,
surface_preload,
surface_map,
surface_unmap,
};
@ -2009,13 +2001,6 @@ static HRESULT gdi_surface_draw_overlay(struct wined3d_surface *surface)
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)
{
TRACE("surface %p, rect %s, flags %#x.\n",
@ -2052,7 +2037,6 @@ static const struct wined3d_surface_ops gdi_surface_ops =
gdi_surface_private_setup,
gdi_surface_realize_palette,
gdi_surface_draw_overlay,
gdi_surface_preload,
gdi_surface_map,
gdi_surface_unmap,
};
@ -2947,7 +2931,13 @@ void CDECL wined3d_surface_preload(struct wined3d_surface *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)

View File

@ -2002,7 +2002,6 @@ struct wined3d_surface_ops
HRESULT (*surface_private_setup)(struct wined3d_surface *surface);
void (*surface_realize_palette)(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_unmap)(struct wined3d_surface *surface);
};