wined3d: Get rid of SFLAG_DONOTFREE.

This commit is contained in:
Henri Verbeet 2014-09-29 09:11:55 +02:00 committed by Alexandre Julliard
parent 97856bcfee
commit 2d5c8aff3c
2 changed files with 6 additions and 11 deletions

View File

@ -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);

View File

@ -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,