wined3d: Get rid of the redundant "device" parameter to context_destroy().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e37a5e8029
commit
bad9cd29a8
|
@ -1581,7 +1581,7 @@ void context_release(struct wined3d_context *context)
|
||||||
if (context->destroy_delayed)
|
if (context->destroy_delayed)
|
||||||
{
|
{
|
||||||
TRACE("Destroying context %p.\n", context);
|
TRACE("Destroying context %p.\n", context);
|
||||||
context_destroy(context->device, context);
|
wined3d_context_destroy(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2280,8 +2280,9 @@ BOOL wined3d_adapter_gl_create_context(struct wined3d_context *context,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void context_destroy(struct wined3d_device *device, struct wined3d_context *context)
|
void wined3d_context_destroy(struct wined3d_context *context)
|
||||||
{
|
{
|
||||||
|
struct wined3d_device *device = context->device;
|
||||||
BOOL destroy;
|
BOOL destroy;
|
||||||
|
|
||||||
TRACE("Destroying ctx %p\n", context);
|
TRACE("Destroying ctx %p\n", context);
|
||||||
|
@ -2289,7 +2290,8 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
||||||
wined3d_from_cs(device->cs);
|
wined3d_from_cs(device->cs);
|
||||||
|
|
||||||
/* We delay destroying a context when it is active. The context_release()
|
/* We delay destroying a context when it is active. The context_release()
|
||||||
* function invokes context_destroy() again while leaving the last level. */
|
* function invokes wined3d_context_destroy() again while leaving the last
|
||||||
|
* level. */
|
||||||
if (context->level)
|
if (context->level)
|
||||||
{
|
{
|
||||||
TRACE("Delaying destruction of context %p.\n", context);
|
TRACE("Delaying destruction of context %p.\n", context);
|
||||||
|
|
|
@ -1019,7 +1019,7 @@ static void wined3d_device_delete_opengl_contexts_cs(void *object)
|
||||||
if (device->contexts[0]->swapchain)
|
if (device->contexts[0]->swapchain)
|
||||||
swapchain_destroy_contexts(device->contexts[0]->swapchain);
|
swapchain_destroy_contexts(device->contexts[0]->swapchain);
|
||||||
else
|
else
|
||||||
context_destroy(device, device->contexts[0]);
|
wined3d_context_destroy(device->contexts[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1095,7 +1095,7 @@ static struct wined3d_context *swapchain_create_context(struct wined3d_swapchain
|
||||||
if (!(ctx_array = heap_calloc(swapchain->num_contexts + 1, sizeof(*ctx_array))))
|
if (!(ctx_array = heap_calloc(swapchain->num_contexts + 1, sizeof(*ctx_array))))
|
||||||
{
|
{
|
||||||
ERR("Out of memory when trying to allocate a new context array\n");
|
ERR("Out of memory when trying to allocate a new context array\n");
|
||||||
context_destroy(swapchain->device, ctx);
|
wined3d_context_destroy(ctx);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
memcpy(ctx_array, swapchain->context, sizeof(*ctx_array) * swapchain->num_contexts);
|
memcpy(ctx_array, swapchain->context, sizeof(*ctx_array) * swapchain->num_contexts);
|
||||||
|
@ -1114,7 +1114,7 @@ void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain)
|
||||||
|
|
||||||
for (i = 0; i < swapchain->num_contexts; ++i)
|
for (i = 0; i < swapchain->num_contexts; ++i)
|
||||||
{
|
{
|
||||||
context_destroy(swapchain->device, swapchain->context[i]);
|
wined3d_context_destroy(swapchain->context[i]);
|
||||||
}
|
}
|
||||||
heap_free(swapchain->context);
|
heap_free(swapchain->context);
|
||||||
swapchain->num_contexts = 0;
|
swapchain->num_contexts = 0;
|
||||||
|
|
|
@ -2189,7 +2189,7 @@ void context_copy_bo_address(struct wined3d_context *context,
|
||||||
struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_texture *target,
|
struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_texture *target,
|
||||||
const struct wined3d_format *ds_format) DECLSPEC_HIDDEN;
|
const struct wined3d_format *ds_format) DECLSPEC_HIDDEN;
|
||||||
HGLRC context_create_wgl_attribs(const struct wined3d_gl_info *gl_info, HDC hdc, HGLRC share_ctx) DECLSPEC_HIDDEN;
|
HGLRC context_create_wgl_attribs(const struct wined3d_gl_info *gl_info, HDC hdc, HGLRC share_ctx) DECLSPEC_HIDDEN;
|
||||||
void context_destroy(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
void wined3d_context_destroy(struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||||
void context_draw_shaded_quad(struct wined3d_context *context, struct wined3d_texture_gl *texture_gl,
|
void context_draw_shaded_quad(struct wined3d_context *context, struct wined3d_texture_gl *texture_gl,
|
||||||
unsigned int sub_resource_idx, const RECT *src_rect, const RECT *dst_rect,
|
unsigned int sub_resource_idx, const RECT *src_rect, const RECT *dst_rect,
|
||||||
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN;
|
||||||
|
|
Loading…
Reference in New Issue