[PATCH 4/5] d3d8: Just return the resource type in IDirect3DResource8::GetType() implementations.
Henri Verbeet
hverbeet at codeweavers.com
Sun Jun 5 15:48:53 CDT 2011
There's no need to ask wined3d, since it's constant for a given
implementation.
---
dlls/d3d8/cubetexture.c | 9 +--------
dlls/d3d8/texture.c | 9 +--------
dlls/d3d8/volumetexture.c | 9 +--------
3 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/dlls/d3d8/cubetexture.c b/dlls/d3d8/cubetexture.c
index 5915c54..304508b 100644
--- a/dlls/d3d8/cubetexture.c
+++ b/dlls/d3d8/cubetexture.c
@@ -194,16 +194,9 @@ static void WINAPI IDirect3DCubeTexture8Impl_PreLoad(IDirect3DCubeTexture8 *ifac
static D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(IDirect3DCubeTexture8 *iface)
{
- IDirect3DCubeTexture8Impl *This = impl_from_IDirect3DCubeTexture8(iface);
- D3DRESOURCETYPE type;
-
TRACE("iface %p.\n", iface);
- wined3d_mutex_lock();
- type = wined3d_texture_get_type(This->wined3d_texture);
- wined3d_mutex_unlock();
-
- return type;
+ return D3DRTYPE_CUBETEXTURE;
}
/* IDirect3DCubeTexture8 IDirect3DBaseTexture8 Interface follow: */
diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c
index 1b9db9d..20cb6ed 100644
--- a/dlls/d3d8/texture.c
+++ b/dlls/d3d8/texture.c
@@ -192,16 +192,9 @@ static void WINAPI IDirect3DTexture8Impl_PreLoad(IDirect3DTexture8 *iface)
static D3DRESOURCETYPE WINAPI IDirect3DTexture8Impl_GetType(IDirect3DTexture8 *iface)
{
- IDirect3DTexture8Impl *This = impl_from_IDirect3DTexture8(iface);
- D3DRESOURCETYPE type;
-
TRACE("iface %p.\n", iface);
- wined3d_mutex_lock();
- type = wined3d_texture_get_type(This->wined3d_texture);
- wined3d_mutex_unlock();
-
- return type;
+ return D3DRTYPE_TEXTURE;
}
/* IDirect3DTexture8 IDirect3DBaseTexture8 Interface follow: */
diff --git a/dlls/d3d8/volumetexture.c b/dlls/d3d8/volumetexture.c
index 08e3680..df95401 100644
--- a/dlls/d3d8/volumetexture.c
+++ b/dlls/d3d8/volumetexture.c
@@ -192,16 +192,9 @@ static void WINAPI IDirect3DVolumeTexture8Impl_PreLoad(IDirect3DVolumeTexture8 *
static D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(IDirect3DVolumeTexture8 *iface)
{
- IDirect3DVolumeTexture8Impl *This = impl_from_IDirect3DVolumeTexture8(iface);
- D3DRESOURCETYPE type;
-
TRACE("iface %p.\n", iface);
- wined3d_mutex_lock();
- type = wined3d_texture_get_type(This->wined3d_texture);
- wined3d_mutex_unlock();
-
- return type;
+ return D3DRTYPE_VOLUMETEXTURE;
}
/* IDirect3DVolumeTexture8 IDirect3DBaseTexture8 Interface follow: */
--
1.7.3.4
More information about the wine-patches
mailing list