Henri Verbeet : wined3d: Remove IWineD3DBaseTexture::SetDirty() from the public interface.

Alexandre Julliard julliard at winehq.org
Thu Dec 9 12:26:23 CST 2010


Module: wine
Branch: master
Commit: a3b2407824e364406d28403b1f64c61bdd3c037c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a3b2407824e364406d28403b1f64c61bdd3c037c

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Dec  8 18:28:09 2010 +0100

wined3d: Remove IWineD3DBaseTexture::SetDirty() from the public interface.

---

 dlls/wined3d/basetexture.c     |   13 +++++++------
 dlls/wined3d/cubetexture.c     |    6 ------
 dlls/wined3d/surface.c         |    6 +++---
 dlls/wined3d/texture.c         |    6 ------
 dlls/wined3d/volumetexture.c   |    6 ------
 dlls/wined3d/wined3d_private.h |    2 +-
 include/wine/wined3d.idl       |    3 ---
 7 files changed, 11 insertions(+), 31 deletions(-)

diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c
index 166584d..5047081 100644
--- a/dlls/wined3d/basetexture.c
+++ b/dlls/wined3d/basetexture.c
@@ -237,13 +237,14 @@ void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface)
     FIXME("iface %p stub!\n", iface);
 }
 
-BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty)
+BOOL basetexture_set_dirty(IWineD3DBaseTextureImpl *texture, BOOL dirty)
 {
     BOOL old;
-    IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
-    old = This->baseTexture.texture_rgb.dirty || This->baseTexture.texture_srgb.dirty;
-    This->baseTexture.texture_rgb.dirty = dirty;
-    This->baseTexture.texture_srgb.dirty = dirty;
+
+    old = texture->baseTexture.texture_rgb.dirty || texture->baseTexture.texture_srgb.dirty;
+    texture->baseTexture.texture_rgb.dirty = dirty;
+    texture->baseTexture.texture_srgb.dirty = dirty;
+
     return old;
 }
 
@@ -293,7 +294,7 @@ HRESULT basetexture_bind(IWineD3DBaseTexture *iface, BOOL srgb, BOOL *set_surfac
         gl_tex->states[WINED3DTEXSTA_MAXANISOTROPY] = 1;
         gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE]   = 0;
         gl_tex->states[WINED3DTEXSTA_SHADOW]        = FALSE;
-        IWineD3DBaseTexture_SetDirty(iface, TRUE);
+        basetexture_set_dirty(This, TRUE);
         isNewTexture = TRUE;
 
         if(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP) {
diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c
index d2f2f19..5287e37 100644
--- a/dlls/wined3d/cubetexture.c
+++ b/dlls/wined3d/cubetexture.c
@@ -270,11 +270,6 @@ static void WINAPI IWineD3DCubeTextureImpl_GenerateMipSubLevels(IWineD3DCubeText
     basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface);
 }
 
-/* Internal function, No d3d mapping */
-static BOOL WINAPI IWineD3DCubeTextureImpl_SetDirty(IWineD3DCubeTexture *iface, BOOL dirty) {
-    return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty);
-}
-
 /* Context activation is done by the caller. */
 static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface, BOOL srgb) {
     IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
@@ -434,7 +429,6 @@ static const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
     IWineD3DCubeTextureImpl_SetAutoGenFilterType,
     IWineD3DCubeTextureImpl_GetAutoGenFilterType,
     IWineD3DCubeTextureImpl_GenerateMipSubLevels,
-    IWineD3DCubeTextureImpl_SetDirty,
     IWineD3DCubeTextureImpl_BindTexture,
     IWineD3DCubeTextureImpl_IsCondNP2,
     /* IWineD3DCubeTexture */
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 91cc880..e10ed0c 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -980,7 +980,7 @@ void surface_add_dirty_rect(IWineD3DSurfaceImpl *surface, const RECT *dirty_rect
     if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
     {
         TRACE("Passing to container.\n");
-        IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)surface->container.u.texture, TRUE);
+        basetexture_set_dirty(surface->container.u.texture, TRUE);
     }
 }
 
@@ -4299,7 +4299,7 @@ void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL pers
             if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
             {
                 TRACE("Passing to container.\n");
-                IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)surface->container.u.texture, TRUE);
+                basetexture_set_dirty(surface->container.u.texture, TRUE);
             }
         }
         surface->flags &= ~SFLAG_LOCATIONS;
@@ -4321,7 +4321,7 @@ void surface_modify_location(IWineD3DSurfaceImpl *surface, DWORD flag, BOOL pers
             if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
             {
                 TRACE("Passing to container\n");
-                IWineD3DBaseTexture_SetDirty((IWineD3DBaseTexture *)surface->container.u.texture, TRUE);
+                basetexture_set_dirty(surface->container.u.texture, TRUE);
             }
         }
         surface->flags &= ~flag;
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 9fe7280..e610846 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -261,11 +261,6 @@ static void WINAPI IWineD3DTextureImpl_GenerateMipSubLevels(IWineD3DTexture *ifa
     basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface);
 }
 
-/* Internal function, No d3d mapping */
-static BOOL WINAPI IWineD3DTextureImpl_SetDirty(IWineD3DTexture *iface, BOOL dirty) {
-    return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty);
-}
-
 /* Context activation is done by the caller. */
 static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface, BOOL srgb) {
     IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
@@ -449,7 +444,6 @@ static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
     IWineD3DTextureImpl_SetAutoGenFilterType,
     IWineD3DTextureImpl_GetAutoGenFilterType,
     IWineD3DTextureImpl_GenerateMipSubLevels,
-    IWineD3DTextureImpl_SetDirty,
     IWineD3DTextureImpl_BindTexture,
     IWineD3DTextureImpl_IsCondNP2,
     /* IWineD3DTexture */
diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c
index 3d1a22b..0c61111 100644
--- a/dlls/wined3d/volumetexture.c
+++ b/dlls/wined3d/volumetexture.c
@@ -225,11 +225,6 @@ static void WINAPI IWineD3DVolumeTextureImpl_GenerateMipSubLevels(IWineD3DVolume
     basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface);
 }
 
-/* Internal function, No d3d mapping */
-static BOOL WINAPI IWineD3DVolumeTextureImpl_SetDirty(IWineD3DVolumeTexture *iface, BOOL dirty) {
-    return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty);
-}
-
 /* Context activation is done by the caller. */
 static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface, BOOL srgb)
 {
@@ -365,7 +360,6 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
     IWineD3DVolumeTextureImpl_SetAutoGenFilterType,
     IWineD3DVolumeTextureImpl_GetAutoGenFilterType,
     IWineD3DVolumeTextureImpl_GenerateMipSubLevels,
-    IWineD3DVolumeTextureImpl_SetDirty,
     /* not in d3d */
     IWineD3DVolumeTextureImpl_BindTexture,
     IWineD3DVolumeTextureImpl_IsCondNP2,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4b6b109..ebcb4ea 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1925,7 +1925,7 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, UINT layer_count, UIN
         const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
 HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface,
         WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN;
-BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty) DECLSPEC_HIDDEN;
+BOOL basetexture_set_dirty(IWineD3DBaseTextureImpl *texture, BOOL dirty) DECLSPEC_HIDDEN;
 DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod) DECLSPEC_HIDDEN;
 void basetexture_unload(IWineD3DBaseTexture *iface) DECLSPEC_HIDDEN;
 
diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl
index 3b4fda4..45e4143 100644
--- a/include/wine/wined3d.idl
+++ b/include/wine/wined3d.idl
@@ -2525,9 +2525,6 @@ interface IWineD3DBaseTexture : IWineD3DResource
     );
     void GenerateMipSubLevels(
     );
-    BOOL SetDirty(
-        BOOL dirty
-    );
     HRESULT BindTexture(
         [in] BOOL srgb
     );




More information about the wine-cvs mailing list