wined3d: Get rid of IWineD3DVolumeTextureImpl.
authorHenri Verbeet <hverbeet@codeweavers.com>
Tue, 15 Mar 2011 17:19:34 +0000 (18:19 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 16 Mar 2011 13:14:22 +0000 (14:14 +0100)
dlls/wined3d/device.c
dlls/wined3d/volume.c
dlls/wined3d/volumetexture.c
dlls/wined3d/wined3d_private.h

index b009b83133a628c26808b275547e6e5175ac2f6a..735cbca66397738c45c5f16dda474c43dae4158b 100644 (file)
@@ -1139,8 +1139,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolumeTexture(IWineD3DDevice *ifa
         UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, enum wined3d_format_id Format, WINED3DPOOL Pool,
         void *parent, const struct wined3d_parent_ops *parent_ops, IWineD3DBaseTexture **ppVolumeTexture)
 {
-    IWineD3DDeviceImpl        *This = (IWineD3DDeviceImpl *)iface;
-    IWineD3DVolumeTextureImpl *object;
+    IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
+    IWineD3DBaseTextureImpl *object;
     HRESULT hr;
 
     TRACE("(%p) : W(%u) H(%u) D(%u), Lvl(%u) Usage(%#x), Fmt(%u,%s), Pool(%s)\n", This, Width, Height,
index 3f7090c6e3f3ba610d785837daaf20b88d8232f5..a0baef38ad54ac5bd06aa6cfc0d2c541a0edc2e3 100644 (file)
@@ -85,7 +85,7 @@ void volume_add_dirty_box(struct IWineD3DVolumeImpl *volume, const WINED3DBOX *d
     }
 }
 
-void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container)
+void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DBaseTextureImpl *container)
 {
     TRACE("volume %p, container %p.\n", volume, container);
 
index 22f6c2778a2fe8ac4f47e26a5160091d7cff1dc0..07a83c3ff242ee8c015d6382db7f6fab3b47eb46 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * IWineD3DVolumeTexture implementation
- *
  * Copyright 2002-2005 Jason Edmeades
  * Copyright 2002-2005 Raphael Junqueira
  * Copyright 2005 Oliver Stieber
@@ -113,7 +111,7 @@ static const struct wined3d_resource_ops volumetexture_resource_ops =
     volumetexture_unload,
 };
 
-static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This)
+static void volumetexture_cleanup(IWineD3DBaseTextureImpl *This)
 {
     unsigned int i;
 
@@ -141,7 +139,7 @@ static void volumetexture_cleanup(IWineD3DVolumeTextureImpl *This)
 
 static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTexture *iface, REFIID riid, LPVOID *ppobj)
 {
-    IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
+    IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
     TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
     if (IsEqualGUID(riid, &IID_IUnknown)
         || IsEqualGUID(riid, &IID_IWineD3DBase)
@@ -158,7 +156,7 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DBaseTextu
 
 static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
 {
-    IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
+    IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
     TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
     return InterlockedIncrement(&This->resource.ref);
 }
@@ -166,7 +164,7 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
 /* Do not call while under the GL lock. */
 static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface)
 {
-    IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
+    IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
     ULONG ref;
     TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
     ref = InterlockedDecrement(&This->resource.ref);
@@ -182,28 +180,28 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DBaseTexture *iface
 static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DBaseTexture *iface,
         REFGUID riid, const void *data, DWORD data_size, DWORD flags)
 {
-    return resource_set_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, riid, data, data_size, flags);
+    return resource_set_private_data(&((IWineD3DBaseTextureImpl *)iface)->resource, riid, data, data_size, flags);
 }
 
 static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DBaseTexture *iface,
         REFGUID guid, void *data, DWORD *data_size)
 {
-    return resource_get_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, guid, data, data_size);
+    return resource_get_private_data(&((IWineD3DBaseTextureImpl *)iface)->resource, guid, data, data_size);
 }
 
 static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DBaseTexture *iface, REFGUID refguid)
 {
-    return resource_free_private_data(&((IWineD3DVolumeTextureImpl *)iface)->resource, refguid);
+    return resource_free_private_data(&((IWineD3DBaseTextureImpl *)iface)->resource, refguid);
 }
 
 static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DBaseTexture *iface, DWORD priority)
 {
-    return resource_set_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource, priority);
+    return resource_set_priority(&((IWineD3DBaseTextureImpl *)iface)->resource, priority);
 }
 
 static DWORD WINAPI IWineD3DVolumeTextureImpl_GetPriority(IWineD3DBaseTexture *iface)
 {
-    return resource_get_priority(&((IWineD3DVolumeTextureImpl *)iface)->resource);
+    return resource_get_priority(&((IWineD3DBaseTextureImpl *)iface)->resource);
 }
 
 static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
@@ -213,14 +211,14 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
 
 static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DBaseTexture *iface)
 {
-    return resource_get_type(&((IWineD3DVolumeTextureImpl *)iface)->resource);
+    return resource_get_type(&((IWineD3DBaseTextureImpl *)iface)->resource);
 }
 
 static void * WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DBaseTexture *iface)
 {
     TRACE("iface %p\n", iface);
 
-    return ((IWineD3DVolumeTextureImpl *)iface)->resource.parent;
+    return ((IWineD3DBaseTextureImpl *)iface)->resource.parent;
 }
 
 static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew)
@@ -318,7 +316,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DVolumeTexture_Vtbl =
     IWineD3DVolumeTextureImpl_AddDirtyRegion,
 };
 
-HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height,
+HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT height,
         UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
         WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops)
 {
index f45e9e910315bdc4b9ee41b1674a01b3d92868fc..8726e2dbda30543c70fea574ce829f6c32ea014f 100644 (file)
@@ -1965,6 +1965,10 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
         IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
         void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
 
+HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT height,
+        UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
+        WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+
 /*****************************************************************************
  * IWineD3DCubeTexture implementation structure (extends IWineD3DBaseTextureImpl)
  */
@@ -1986,7 +1990,7 @@ typedef struct IWineD3DVolumeImpl
     const IWineD3DVolumeVtbl  *lpVtbl;
     struct wined3d_resource resource;
 
-    struct IWineD3DVolumeTextureImpl *container;
+    struct IWineD3DBaseTextureImpl *container;
     BOOL                    lockable;
     BOOL                    locked;
     WINED3DBOX              lockedBox;
@@ -2004,19 +2008,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT
         UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
         void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
 void volume_load(IWineD3DVolumeImpl *volume, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN;
-void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DVolumeTextureImpl *container) DECLSPEC_HIDDEN;
-
-typedef struct IWineD3DVolumeTextureImpl
-{
-    /* IUnknown & WineD3DResource/WineD3DBaseTexture Information     */
-    const IWineD3DBaseTextureVtbl *lpVtbl;
-    struct wined3d_resource resource;
-    IWineD3DBaseTextureClass  baseTexture;
-} IWineD3DVolumeTextureImpl;
-
-HRESULT volumetexture_init(IWineD3DVolumeTextureImpl *texture, UINT width, UINT height,
-        UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
-        WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
+void volume_set_container(IWineD3DVolumeImpl *volume, struct IWineD3DBaseTextureImpl *container) DECLSPEC_HIDDEN;
 
 /*****************************************************************************
  * Structure for DIB Surfaces (GetDC and GDI surfaces)