wined3d: Send palette destruction through the command stream.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-06-22 10:39:04 +02:00 committed by Alexandre Julliard
parent 97eb359588
commit bb6417d5af
1 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,11 @@ ULONG CDECL wined3d_palette_incref(struct wined3d_palette *palette)
return refcount;
}
static void wined3d_palette_destroy_object(void *object)
{
HeapFree(GetProcessHeap(), 0, object);
}
ULONG CDECL wined3d_palette_decref(struct wined3d_palette *palette)
{
ULONG refcount = InterlockedDecrement(&palette->ref);
@ -40,7 +45,7 @@ ULONG CDECL wined3d_palette_decref(struct wined3d_palette *palette)
TRACE("%p decreasing refcount to %u.\n", palette, refcount);
if (!refcount)
HeapFree(GetProcessHeap(), 0, palette);
wined3d_cs_emit_destroy_object(palette->device->cs, wined3d_palette_destroy_object, palette);
return refcount;
}