From b59dc811e241264b8800e72dbc333b560a1a1913 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 3 Feb 2011 20:14:04 +0100 Subject: [PATCH] wined3d: Get rid of the IWineD3DClipper typedefs. --- dlls/wined3d/clipper.c | 11 ++++++----- dlls/wined3d/surface_base.c | 15 +++++++++------ dlls/wined3d/wined3d_private.h | 8 ++++---- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/clipper.c b/dlls/wined3d/clipper.c index 32572965e15..e5131d7f749 100644 --- a/dlls/wined3d/clipper.c +++ b/dlls/wined3d/clipper.c @@ -145,17 +145,18 @@ HRESULT CDECL wined3d_clipper_is_clip_list_changed(const struct wined3d_clipper struct wined3d_clipper * CDECL wined3d_clipper_create(void) { - IWineD3DClipperImpl *obj; + struct wined3d_clipper *clipper; TRACE("\n"); - obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*obj)); - if(!obj) + clipper = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*clipper)); + if (!clipper) { ERR("Out of memory when trying to allocate a WineD3D Clipper\n"); return NULL; } - wined3d_clipper_incref(obj); - return (IWineD3DClipper *) obj; + wined3d_clipper_incref(clipper); + + return clipper; } diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index b28e1857867..65d632751e8 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -472,21 +472,24 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, con return WINED3D_OK; } -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) +HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, struct wined3d_clipper *clipper) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)->(%p)\n", This, clipper); - This->clipper = (IWineD3DClipperImpl *)clipper; + TRACE("iface %p, clipper %p.\n", iface, clipper); + + This->clipper = clipper; + return WINED3D_OK; } -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) +HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, struct wined3d_clipper **clipper) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface; - TRACE("(%p)->(%p)\n", This, clipper); - *clipper = (IWineD3DClipper *)This->clipper; + TRACE("iface %p, clipper %p.\n", iface, clipper); + + *clipper = This->clipper; if (*clipper) wined3d_clipper_incref(*clipper); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 20da4c7ac26..34fdc3fe024 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -58,8 +58,6 @@ typedef struct IWineD3DSwapChainImpl IWineD3DSwapChainImpl; struct IWineD3DBaseShaderImpl; struct IWineD3DBaseTextureImpl; struct IWineD3DResourceImpl; -typedef struct wined3d_clipper IWineD3DClipperImpl; -typedef struct wined3d_clipper IWineD3DClipper; /* Texture format fixups */ @@ -2208,8 +2206,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *ifac DWORD flags, IWineD3DSurface *Ref) DECLSPEC_HIDDEN; HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, const RECT *SrcRect, IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD flags, const WINEDDOVERLAYFX *FX) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) DECLSPEC_HIDDEN; -HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) DECLSPEC_HIDDEN; +HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, + struct wined3d_clipper *clipper) DECLSPEC_HIDDEN; +HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, + struct wined3d_clipper **clipper) DECLSPEC_HIDDEN; HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface, enum wined3d_format_id format_id) DECLSPEC_HIDDEN; HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) DECLSPEC_HIDDEN; -- 2.11.4.GIT