Module: wine Branch: master Commit: b62915dabb8c009f305d77109bbdbe774b701225 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b62915dabb8c009f305d77109b...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Sep 10 09:32:33 2013 +0200
wined3d: Replace surface_modify_location(surface, location, FALSE) calls with surface_invalidate_location().
---
dlls/wined3d/context.c | 2 +- dlls/wined3d/surface.c | 14 ++++++-------- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 4a079cf..026158d 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2453,7 +2453,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d if (context->current_rt->texture_name_srgb) surface_internal_preload(context->current_rt, SRGB_SRGB); surface_internal_preload(context->current_rt, SRGB_RGB); - surface_modify_location(context->current_rt, SFLAG_INDRAWABLE, FALSE); + surface_invalidate_location(context->current_rt, SFLAG_INDRAWABLE); } }
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index ee404c1..01035b4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -605,7 +605,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface) wined3d_resource_free_sysmem(surface->resource.heap_memory); surface->resource.allocatedMemory = NULL; surface->resource.heap_memory = NULL; - surface_modify_location(surface, SFLAG_INSYSMEM, FALSE); + surface_invalidate_location(surface, SFLAG_INSYSMEM); }
/* Context activation is done by the caller. */ @@ -703,8 +703,7 @@ static void surface_release_client_storage(struct wined3d_surface *surface)
context_release(context);
- surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE); - surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); + surface_invalidate_location(surface, SFLAG_INTEXTURE | SFLAG_INSRGBTEX); surface_force_reload(surface); }
@@ -818,7 +817,7 @@ static void surface_realize_palette(struct wined3d_surface *surface)
/* We want to force a palette refresh, so mark the drawable as not being up to date */ if (!surface_is_offscreen(surface)) - surface_modify_location(surface, SFLAG_INDRAWABLE, FALSE); + surface_invalidate_location(surface, SFLAG_INDRAWABLE); } else { @@ -1528,10 +1527,9 @@ static void surface_unload(struct wined3d_resource *resource) { /* Load the surface into system memory */ surface_load_location(surface, SFLAG_INSYSMEM, NULL); - surface_modify_location(surface, surface->draw_binding, FALSE); + surface_invalidate_location(surface, surface->draw_binding); } - surface_modify_location(surface, SFLAG_INTEXTURE, FALSE); - surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE); + surface_invalidate_location(surface, SFLAG_INTEXTURE | SFLAG_INSRGBTEX); surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
context = context_acquire(device, NULL); @@ -5347,7 +5345,7 @@ static void surface_validate_location(struct wined3d_surface *surface, DWORD loc } }
-static void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) +void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) { TRACE("surface %p, location %s.\n", surface, debug_surflocation(location & SFLAG_LOCATIONS));
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 981d946..48917fd 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -521,7 +521,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO) { surface_load_location(back_buffer, SFLAG_INTEXTURE, NULL); - surface_modify_location(back_buffer, SFLAG_INDRAWABLE, FALSE); + surface_invalidate_location(back_buffer, SFLAG_INDRAWABLE); swapchain->render_to_fbo = TRUE; swapchain_update_draw_bindings(swapchain); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 3fbad8b..06e17f3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2253,6 +2253,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN; GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_internal_preload(struct wined3d_surface *surface, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; +void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN; BOOL surface_is_offscreen(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN; void surface_load_ds_location(struct wined3d_surface *surface,