Henri Verbeet : wined3d: Remove surface_preload from wined3d_surface_ops.

Alexandre Julliard julliard at winehq.org
Mon Nov 7 13:30:40 CST 2011


Module: wine
Branch: master
Commit: 48b6050ca36f6da3bc6a5858aea97a79998fe47e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=48b6050ca36f6da3bc6a5858aea97a79998fe47e

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Sun Nov  6 22:05:55 2011 +0100

wined3d: Remove surface_preload from wined3d_surface_ops.

---

 dlls/wined3d/surface.c         |   24 +++++++-----------------
 dlls/wined3d/wined3d_private.h |    1 -
 2 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 5568695..a123016 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c4784b0..ba78162 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -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);
 };




More information about the wine-cvs mailing list