Module: wine Branch: master Commit: 2d5c8aff3ccbbdcf3a8c9d6e3262d894684d1a9c URL: http://source.winehq.org/git/wine.git/?a=commit;h=2d5c8aff3ccbbdcf3a8c9d6e32...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Sep 29 09:11:55 2014 +0200
wined3d: Get rid of SFLAG_DONOTFREE.
---
dlls/wined3d/surface.c | 7 ++++++- dlls/wined3d/wined3d_private.h | 10 ---------- 2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index add864a..955c1b6 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -587,7 +587,12 @@ void surface_prepare_map_memory(struct wined3d_surface *surface)
static void surface_evict_sysmem(struct wined3d_surface *surface) { - if (surface->resource.map_count || surface->flags & SFLAG_DONOTFREE) + /* In some conditions the surface memory must not be freed: + * SFLAG_CONVERTED: Converting the data back would take too long + * SFLAG_DYNLOCK: Avoid freeing the data for performance + * SFLAG_CLIENT: OpenGL uses our memory as backup */ + if (surface->resource.map_count || surface->flags & (SFLAG_CONVERTED | SFLAG_DYNLOCK + | SFLAG_CLIENT | SFLAG_PIN_SYSMEM)) return;
wined3d_resource_free_sysmem(&surface->resource); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 76ac66a..110334b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2350,16 +2350,6 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D #define SFLAG_ALLOCATED 0x00000800 /* A GL texture is allocated for this surface. */ #define SFLAG_SRGBALLOCATED 0x00001000 /* A sRGB GL texture is allocated for this surface. */
-/* In some conditions the surface memory must not be freed: - * SFLAG_CONVERTED: Converting the data back would take too long - * SFLAG_DYNLOCK: Avoid freeing the data for performance - * SFLAG_CLIENT: OpenGL uses our memory as backup - */ -#define SFLAG_DONOTFREE (SFLAG_CONVERTED | \ - SFLAG_DYNLOCK | \ - SFLAG_CLIENT | \ - SFLAG_PIN_SYSMEM) - enum wined3d_conversion_type { WINED3D_CT_NONE,