Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
afa93a5b
Commit
afa93a5b
authored
Mar 17, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DCubeTextureImpl.
parent
b8c40f3a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
24 deletions
+17
-24
cubetexture.c
dlls/wined3d/cubetexture.c
+12
-12
device.c
dlls/wined3d/device.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-11
No files found.
dlls/wined3d/cubetexture.c
View file @
afa93a5b
...
@@ -168,7 +168,7 @@ static const struct wined3d_resource_ops cubetexture_resource_ops =
...
@@ -168,7 +168,7 @@ static const struct wined3d_resource_ops cubetexture_resource_ops =
cubetexture_unload
,
cubetexture_unload
,
};
};
static
void
cubetexture_cleanup
(
IWineD3D
Cub
eTextureImpl
*
This
)
static
void
cubetexture_cleanup
(
IWineD3D
Bas
eTextureImpl
*
This
)
{
{
UINT
sub_count
=
This
->
baseTexture
.
level_count
*
This
->
baseTexture
.
layer_count
;
UINT
sub_count
=
This
->
baseTexture
.
level_count
*
This
->
baseTexture
.
layer_count
;
UINT
i
;
UINT
i
;
...
@@ -197,7 +197,7 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This)
...
@@ -197,7 +197,7 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_QueryInterface
(
IWineD3DBaseTexture
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_QueryInterface
(
IWineD3DBaseTexture
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
{
IWineD3D
CubeTextureImpl
*
This
=
(
IWineD3DCub
eTextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBas
eTextureImpl
*
)
iface
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
...
@@ -214,7 +214,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DBaseTexture
...
@@ -214,7 +214,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DBaseTexture
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_AddRef
(
IWineD3DBaseTexture
*
iface
)
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_AddRef
(
IWineD3DBaseTexture
*
iface
)
{
{
IWineD3D
CubeTextureImpl
*
This
=
(
IWineD3DCub
eTextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBas
eTextureImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef increasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
TRACE
(
"(%p) : AddRef increasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
return
InterlockedIncrement
(
&
This
->
resource
.
ref
);
return
InterlockedIncrement
(
&
This
->
resource
.
ref
);
}
}
...
@@ -222,7 +222,7 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
...
@@ -222,7 +222,7 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_AddRef(IWineD3DBaseTexture *iface)
/* Do not call while under the GL lock. */
/* Do not call while under the GL lock. */
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_Release
(
IWineD3DBaseTexture
*
iface
)
static
ULONG
WINAPI
IWineD3DCubeTextureImpl_Release
(
IWineD3DBaseTexture
*
iface
)
{
{
IWineD3D
CubeTextureImpl
*
This
=
(
IWineD3DCub
eTextureImpl
*
)
iface
;
IWineD3D
BaseTextureImpl
*
This
=
(
IWineD3DBas
eTextureImpl
*
)
iface
;
ULONG
ref
;
ULONG
ref
;
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
TRACE
(
"(%p) : Releasing from %d
\n
"
,
This
,
This
->
resource
.
ref
);
ref
=
InterlockedDecrement
(
&
This
->
resource
.
ref
);
ref
=
InterlockedDecrement
(
&
This
->
resource
.
ref
);
...
@@ -238,28 +238,28 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DBaseTexture *iface)
...
@@ -238,28 +238,28 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DBaseTexture *iface)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetPrivateData
(
IWineD3DBaseTexture
*
iface
,
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_SetPrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
REFGUID
riid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
{
return
resource_set_private_data
(
&
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
,
riid
,
data
,
data_size
,
flags
);
return
resource_set_private_data
(
&
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
,
riid
,
data
,
data_size
,
flags
);
}
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetPrivateData
(
IWineD3DBaseTexture
*
iface
,
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetPrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
{
{
return
resource_get_private_data
(
&
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
,
guid
,
data
,
data_size
);
return
resource_get_private_data
(
&
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
,
guid
,
data
,
data_size
);
}
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_FreePrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
refguid
)
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_FreePrivateData
(
IWineD3DBaseTexture
*
iface
,
REFGUID
refguid
)
{
{
return
resource_free_private_data
(
&
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
,
refguid
);
return
resource_free_private_data
(
&
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
,
refguid
);
}
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetPriority
(
IWineD3DBaseTexture
*
iface
,
DWORD
priority
)
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetPriority
(
IWineD3DBaseTexture
*
iface
,
DWORD
priority
)
{
{
return
resource_set_priority
(
&
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
,
priority
);
return
resource_set_priority
(
&
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
,
priority
);
}
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetPriority
(
IWineD3DBaseTexture
*
iface
)
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_GetPriority
(
IWineD3DBaseTexture
*
iface
)
{
{
return
resource_get_priority
(
&
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
);
return
resource_get_priority
(
&
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
);
}
}
/* Do not call while under the GL lock. */
/* Do not call while under the GL lock. */
...
@@ -270,14 +270,14 @@ static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
...
@@ -270,14 +270,14 @@ static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DBaseTexture *iface)
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DCubeTextureImpl_GetType
(
IWineD3DBaseTexture
*
iface
)
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DCubeTextureImpl_GetType
(
IWineD3DBaseTexture
*
iface
)
{
{
return
resource_get_type
(
&
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
);
return
resource_get_type
(
&
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
);
}
}
static
void
*
WINAPI
IWineD3DCubeTextureImpl_GetParent
(
IWineD3DBaseTexture
*
iface
)
static
void
*
WINAPI
IWineD3DCubeTextureImpl_GetParent
(
IWineD3DBaseTexture
*
iface
)
{
{
TRACE
(
"iface %p.
\n
"
,
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
((
IWineD3D
Cub
eTextureImpl
*
)
iface
)
->
resource
.
parent
;
return
((
IWineD3D
Bas
eTextureImpl
*
)
iface
)
->
resource
.
parent
;
}
}
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetLOD
(
IWineD3DBaseTexture
*
iface
,
DWORD
LODNew
)
static
DWORD
WINAPI
IWineD3DCubeTextureImpl_SetLOD
(
IWineD3DBaseTexture
*
iface
,
DWORD
LODNew
)
...
@@ -367,7 +367,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DCubeTexture_Vtbl =
...
@@ -367,7 +367,7 @@ static const IWineD3DBaseTextureVtbl IWineD3DCubeTexture_Vtbl =
IWineD3DCubeTextureImpl_AddDirtyRegion
,
IWineD3DCubeTextureImpl_AddDirtyRegion
,
};
};
HRESULT
cubetexture_init
(
IWineD3D
Cub
eTextureImpl
*
texture
,
UINT
edge_length
,
UINT
levels
,
HRESULT
cubetexture_init
(
IWineD3D
Bas
eTextureImpl
*
texture
,
UINT
edge_length
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
{
...
...
dlls/wined3d/device.c
View file @
afa93a5b
...
@@ -1207,7 +1207,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
...
@@ -1207,7 +1207,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3DBaseTexture
**
texture
)
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3DBaseTexture
**
texture
)
{
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3D
CubeTextureImpl
*
object
;
/** NOTE: impl ref allowed since this is a create function **/
IWineD3D
BaseTextureImpl
*
object
;
HRESULT
hr
;
HRESULT
hr
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
...
...
dlls/wined3d/wined3d_private.h
View file @
afa93a5b
...
@@ -1954,6 +1954,10 @@ void basetexture_set_dirty(IWineD3DBaseTextureImpl *texture, BOOL dirty) DECLSPE
...
@@ -1954,6 +1954,10 @@ void basetexture_set_dirty(IWineD3DBaseTextureImpl *texture, BOOL dirty) DECLSPE
DWORD
basetexture_set_lod
(
IWineD3DBaseTextureImpl
*
texture
,
DWORD
lod
)
DECLSPEC_HIDDEN
;
DWORD
basetexture_set_lod
(
IWineD3DBaseTextureImpl
*
texture
,
DWORD
lod
)
DECLSPEC_HIDDEN
;
void
basetexture_unload
(
IWineD3DBaseTextureImpl
*
texture
)
DECLSPEC_HIDDEN
;
void
basetexture_unload
(
IWineD3DBaseTextureImpl
*
texture
)
DECLSPEC_HIDDEN
;
HRESULT
cubetexture_init
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
edge_length
,
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
;
HRESULT
texture_init
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
HRESULT
texture_init
(
IWineD3DBaseTextureImpl
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
@@ -1962,17 +1966,6 @@ HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT he
...
@@ -1962,17 +1966,6 @@ HRESULT volumetexture_init(IWineD3DBaseTextureImpl *texture, UINT width, UINT he
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
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
;
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
typedef
struct
IWineD3DCubeTextureImpl
{
const
IWineD3DBaseTextureVtbl
*
lpVtbl
;
struct
wined3d_resource
resource
;
IWineD3DBaseTextureClass
baseTexture
;
}
IWineD3DCubeTextureImpl
;
HRESULT
cubetexture_init
(
IWineD3DCubeTextureImpl
*
texture
,
UINT
edge_length
,
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
;
typedef
struct
IWineD3DVolumeImpl
typedef
struct
IWineD3DVolumeImpl
{
{
/* IUnknown & WineD3DResource fields */
/* IUnknown & WineD3DResource fields */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment