Module: wine Branch: master Commit: e6ca176a482090f4688a98109334e026936c2b14 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e6ca176a482090f4688a981093...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Oct 28 11:00:14 2009 +0100
wined3d: Rename DestroyContext() to context_destroy().
---
dlls/wined3d/context.c | 10 +++++----- dlls/wined3d/device.c | 9 +++++---- dlls/wined3d/swapchain.c | 6 +++--- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index deafe72..7dc7c0e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1501,7 +1501,7 @@ out: * destroyed or unset. context is not a valid pointer after that call. * * Similar to the former call this isn't a performance critical function. A - * helper function for DestroyContext. + * helper function for context_destroy(). * * Params: * This: Device to activate the context for @@ -1556,16 +1556,16 @@ static void RemoveContextFromArray(IWineD3DDeviceImpl *This, struct wined3d_cont }
/***************************************************************************** - * DestroyContext + * context_destroy * - * Destroys a wineD3DContext + * Destroys a wined3d context * * Params: * This: Device to activate the context for * context: Context to destroy * *****************************************************************************/ -void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) +void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) { BOOL destroy;
@@ -1904,7 +1904,7 @@ retry: || This->pbufferWidth < targetimpl->currentDesc.Width || This->pbufferHeight < targetimpl->currentDesc.Height) { - if (This->pbufferContext) DestroyContext(This, This->pbufferContext); + if (This->pbufferContext) context_destroy(This, This->pbufferContext);
/* The display is irrelevant here, the window is 0. But * context_create() needs a valid X connection. Create the context diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7f03adb..66ccc15 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1307,7 +1307,7 @@ error: if(object->context && object->context[0]) { context_release(object->context[0]); - DestroyContext(This, object->context[0]); + context_destroy(This, object->context[0]); } if (object->frontBuffer) IWineD3DSurface_Release(object->frontBuffer); HeapFree(GetProcessHeap(), 0, object); @@ -2011,7 +2011,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, }
/* Delete the pbuffer context if there is any */ - if(This->pbufferContext) DestroyContext(This, This->pbufferContext); + if(This->pbufferContext) context_destroy(This, This->pbufferContext);
/* Delete the mouse cursor texture */ if(This->cursorTexture) { @@ -6658,8 +6658,9 @@ void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain_
context_release(context);
- while(This->numContexts) { - DestroyContext(This, This->contexts[0]); + while (This->numContexts) + { + context_destroy(This, This->contexts[0]); } HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->context = NULL; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 456440b..cab916b 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -76,7 +76,7 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface)
for (i = 0; i < This->num_contexts; ++i) { - DestroyContext(This->wineD3DDevice, This->context[i]); + context_destroy(This->wineD3DDevice, This->context[i]); } /* Restore the screen resolution if we rendered in fullscreen * This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9 @@ -354,7 +354,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_SetDestWindowOverride(IWineD3DSwapCh memcpy(mem, r.pBits, r.Pitch * ((IWineD3DSurfaceImpl *) This->backBuffer[0])->currentDesc.Height); IWineD3DSurface_UnlockRect(This->backBuffer[0]);
- DestroyContext(This->wineD3DDevice, This->context[0]); + context_destroy(This->wineD3DDevice, This->context[0]); This->context[0] = context_create(This->wineD3DDevice, (IWineD3DSurfaceImpl *)This->frontBuffer, This->win_handle, FALSE /* pbuffer */, &This->presentParms); context_release(This->context[0]); @@ -408,7 +408,7 @@ struct wined3d_context *swapchain_create_context_for_thread(IWineD3DSwapChain *i newArray = HeapAlloc(GetProcessHeap(), 0, sizeof(*newArray) * This->num_contexts + 1); if(!newArray) { ERR("Out of memory when trying to allocate a new context array\n"); - DestroyContext(This->wineD3DDevice, ctx); + context_destroy(This->wineD3DDevice, ctx); return NULL; } memcpy(newArray, This->context, sizeof(*newArray) * This->num_contexts); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d8f65b0..3c1e631 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1164,7 +1164,6 @@ typedef enum ContextUsage { CTXUSAGE_CLEAR = 4, /* Drawable and states are set up for clearing */ } ContextUsage;
-void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, IWineD3DSurface *target, enum ContextUsage usage) DECLSPEC_HIDDEN; void context_alloc_event_query(struct wined3d_context *context, @@ -1180,6 +1179,7 @@ void context_attach_surface_fbo(const struct wined3d_context *context, GLenum fbo_target, DWORD idx, IWineD3DSurface *surface) DECLSPEC_HIDDEN; struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *target, HWND win, BOOL create_pbuffer, const WINED3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN; +void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN; void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN;