Henri Verbeet : wined3d: Remove AddDirtyBox() from the public interface.
Alexandre Julliard
julliard at winehq.org
Wed Jan 14 09:03:35 CST 2009
Module: wine
Branch: master
Commit: fd90021666f28801f77064ffb527bebc50003855
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd90021666f28801f77064ffb527bebc50003855
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Jan 14 10:01:10 2009 +0100
wined3d: Remove AddDirtyBox() from the public interface.
This is an internal wined3d function.
---
dlls/wined3d/device.c | 4 ++-
dlls/wined3d/volume.c | 49 +++++++++++++++++++++------------------
dlls/wined3d/volumetexture.c | 6 +++-
dlls/wined3d/wined3d_private.h | 2 +
include/wine/wined3d.idl | 3 --
5 files changed, 35 insertions(+), 29 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d485ded..542e0b8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1143,7 +1143,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVolume(IWineD3DDevice *iface,
memset(&object->lockedBox, 0, sizeof(WINED3DBOX));
object->dirty = TRUE;
- return IWineD3DVolume_AddDirtyBox((IWineD3DVolume *) object, NULL);
+ volume_add_dirty_box((IWineD3DVolume *)object, NULL);
+
+ return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface, UINT EdgeLength,
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index c8d42ad..ceffae7 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -64,6 +64,31 @@ static void volume_bind_and_dirtify(IWineD3DVolume *iface) {
}
}
+void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box)
+{
+ IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
+
+ This->dirty = TRUE;
+ if (dirty_box)
+ {
+ This->lockedBox.Left = min(This->lockedBox.Left, dirty_box->Left);
+ This->lockedBox.Top = min(This->lockedBox.Top, dirty_box->Top);
+ This->lockedBox.Front = min(This->lockedBox.Front, dirty_box->Front);
+ This->lockedBox.Right = max(This->lockedBox.Right, dirty_box->Right);
+ This->lockedBox.Bottom = max(This->lockedBox.Bottom, dirty_box->Bottom);
+ This->lockedBox.Back = max(This->lockedBox.Back, dirty_box->Back);
+ }
+ else
+ {
+ This->lockedBox.Left = 0;
+ This->lockedBox.Top = 0;
+ This->lockedBox.Front = 0;
+ This->lockedBox.Right = This->currentDesc.Width;
+ This->lockedBox.Bottom = This->currentDesc.Height;
+ This->lockedBox.Back = This->currentDesc.Depth;
+ }
+}
+
/* *******************************************
IWineD3DVolume IUnknown parts follow
******************************************* */
@@ -225,7 +250,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_LockBox(IWineD3DVolume *iface, WINED3DL
* Dirtify on lock
* as seen in msdn docs
*/
- IWineD3DVolume_AddDirtyBox(iface, &This->lockedBox);
+ volume_add_dirty_box(iface, &This->lockedBox);
/** Dirtify Container if needed */
if (NULL != This->container) {
@@ -261,27 +286,6 @@ static HRESULT WINAPI IWineD3DVolumeImpl_UnlockBox(IWineD3DVolume *iface) {
/* Internal use functions follow : */
-static HRESULT WINAPI IWineD3DVolumeImpl_AddDirtyBox(IWineD3DVolume *iface, CONST WINED3DBOX* pDirtyBox) {
- IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
- This->dirty = TRUE;
- if (NULL != pDirtyBox) {
- This->lockedBox.Left = min(This->lockedBox.Left, pDirtyBox->Left);
- This->lockedBox.Top = min(This->lockedBox.Top, pDirtyBox->Top);
- This->lockedBox.Front = min(This->lockedBox.Front, pDirtyBox->Front);
- This->lockedBox.Right = max(This->lockedBox.Right, pDirtyBox->Right);
- This->lockedBox.Bottom = max(This->lockedBox.Bottom, pDirtyBox->Bottom);
- This->lockedBox.Back = max(This->lockedBox.Back, pDirtyBox->Back);
- } else {
- This->lockedBox.Left = 0;
- This->lockedBox.Top = 0;
- This->lockedBox.Front = 0;
- This->lockedBox.Right = This->currentDesc.Width;
- This->lockedBox.Bottom = This->currentDesc.Height;
- This->lockedBox.Back = This->currentDesc.Depth;
- }
- return WINED3D_OK;
-}
-
static HRESULT WINAPI IWineD3DVolumeImpl_SetContainer(IWineD3DVolume *iface, IWineD3DBase* container) {
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
@@ -362,7 +366,6 @@ const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl =
IWineD3DVolumeImpl_LockBox,
IWineD3DVolumeImpl_UnlockBox,
/* Internal interface */
- IWineD3DVolumeImpl_AddDirtyBox,
IWineD3DVolumeImpl_LoadTexture,
IWineD3DVolumeImpl_SetContainer
};
diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c
index 6fd2ff0..ea8c073 100644
--- a/dlls/wined3d/volumetexture.c
+++ b/dlls/wined3d/volumetexture.c
@@ -119,7 +119,7 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *ifac
FIXME("Volumetexture (%p) has been reloaded at least 20 times due to WINED3DSAMP_SRGBTEXTURE changes on it\'s sampler\n", This);
for (i = 0; i < This->baseTexture.levels; i++) {
- IWineD3DVolume_AddDirtyBox(This->volumes[i], NULL);
+ volume_add_dirty_box(This->volumes[i], NULL);
IWineD3DVolume_LoadTexture(This->volumes[i], i, srgb_mode);
}
} else {
@@ -295,7 +295,9 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyBox(IWineD3DVolumeTextur
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
This->baseTexture.dirty = TRUE;
TRACE("(%p) : dirtyfication of volume Level (0)\n", This);
- return IWineD3DVolume_AddDirtyBox(This->volumes[0], pDirtyBox);
+ volume_add_dirty_box(This->volumes[0], pDirtyBox);
+
+ return WINED3D_OK;
}
const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d62ebef..a020c79 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1455,6 +1455,8 @@ typedef struct IWineD3DVolumeImpl
extern const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl;
+void volume_add_dirty_box(IWineD3DVolume *iface, const WINED3DBOX *dirty_box);
+
/*****************************************************************************
* IWineD3DVolumeTexture implementation structure (extends IWineD3DBaseTextureImpl)
*/
diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl
index 35bdacd..bcd5b8d 100644
--- a/include/wine/wined3d.idl
+++ b/include/wine/wined3d.idl
@@ -2512,9 +2512,6 @@ interface IWineD3DVolume : IWineD3DResource
);
HRESULT UnlockBox(
);
- HRESULT AddDirtyBox(
- [in] const WINED3DBOX *dirty_box
- );
HRESULT LoadTexture(
[in] int gl_level,
[in] BOOL srgb_mode
More information about the wine-cvs
mailing list