Henri Verbeet : wined3d: Just use surface_invalidate_location() in surface_map().

Alexandre Julliard julliard at winehq.org
Mon Nov 25 13:33:15 CST 2013


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Nov 25 12:31:20 2013 +0100

wined3d: Just use surface_invalidate_location() in surface_map().

---

 dlls/wined3d/surface.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index c947898..8d18c42 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -779,7 +779,6 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD
         TRACE("WINED3D_MAP_DISCARD flag passed, marking SYSMEM as up to date.\n");
         surface_prepare_system_memory(surface);
         surface_validate_location(surface, SFLAG_INSYSMEM);
-        surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
     }
     else
     {
@@ -789,6 +788,9 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD
         surface_load_location(surface, SFLAG_INSYSMEM);
     }
 
+    if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
+        surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
+
     if (surface->flags & SFLAG_PBO)
     {
         const struct wined3d_gl_info *gl_info;
@@ -815,9 +817,6 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD
 
         context_release(context);
     }
-
-    if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY)))
-        surface_set_dirty(surface);
 }
 
 static void surface_unmap(struct wined3d_surface *surface)




More information about the wine-cvs mailing list