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:
parent
97eb359588
commit
bb6417d5af
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue