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
7d295ddf
Commit
7d295ddf
authored
Jun 01, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: COM cleanup for the ID3D10Texture2D iface.
parent
b5a103d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-1
device.c
dlls/d3d10core/device.c
+4
-4
texture.c
dlls/d3d10core/texture.c
+11
-6
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
7d295ddf
...
...
@@ -84,7 +84,7 @@ void d3d10_device_init(struct d3d10_device *device, void *outer_unknown) DECLSPE
/* ID3D10Texture2D */
struct
d3d10_texture2d
{
const
struct
ID3D10Texture2DVtbl
*
vtbl
;
ID3D10Texture2D
ID3D10Texture2D_iface
;
LONG
refcount
;
IUnknown
*
dxgi_surface
;
...
...
dlls/d3d10core/device.c
View file @
7d295ddf
...
...
@@ -681,7 +681,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac
return
hr
;
}
*
texture
=
(
ID3D10Texture2D
*
)
object
;
*
texture
=
&
object
->
ID3D10Texture2D_iface
;
TRACE
(
"Created ID3D10Texture2D %p
\n
"
,
object
);
...
...
@@ -1380,7 +1380,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
*
surface
=
texture
->
wined3d_surface
;
wined3d_surface_incref
(
*
surface
);
ID3D10Texture2D_Release
(
(
ID3D10Texture2D
*
)
textur
e
);
ID3D10Texture2D_Release
(
&
texture
->
ID3D10Texture2D_ifac
e
);
return
S_OK
;
}
...
...
@@ -1423,7 +1423,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
*
surface
=
texture
->
wined3d_surface
;
wined3d_surface_incref
(
*
surface
);
ID3D10Texture2D_Release
(
(
ID3D10Texture2D
*
)
textur
e
);
ID3D10Texture2D_Release
(
&
texture
->
ID3D10Texture2D_ifac
e
);
return
S_OK
;
}
...
...
@@ -1464,7 +1464,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
*
surface
=
texture
->
wined3d_surface
;
wined3d_surface_incref
(
*
surface
);
ID3D10Texture2D_Release
(
(
ID3D10Texture2D
*
)
textur
e
);
ID3D10Texture2D_Release
(
&
texture
->
ID3D10Texture2D_ifac
e
);
return
S_OK
;
}
...
...
dlls/d3d10core/texture.c
View file @
7d295ddf
...
...
@@ -24,11 +24,16 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10core
);
static
inline
struct
d3d10_texture2d
*
impl_from_ID3D10Texture2D
(
ID3D10Texture2D
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d10_texture2d
,
ID3D10Texture2D_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_texture2d_QueryInterface
(
ID3D10Texture2D
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d10_texture2d
*
This
=
(
struct
d3d10_texture2d
*
)
iface
;
struct
d3d10_texture2d
*
This
=
impl_from_ID3D10Texture2D
(
iface
)
;
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
...
...
@@ -56,7 +61,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_QueryInterface(ID3D10Texture2D
static
ULONG
STDMETHODCALLTYPE
d3d10_texture2d_AddRef
(
ID3D10Texture2D
*
iface
)
{
struct
d3d10_texture2d
*
This
=
(
struct
d3d10_texture2d
*
)
iface
;
struct
d3d10_texture2d
*
This
=
impl_from_ID3D10Texture2D
(
iface
)
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -77,7 +82,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_wined3d_object_released(void *pare
static
ULONG
STDMETHODCALLTYPE
d3d10_texture2d_Release
(
ID3D10Texture2D
*
iface
)
{
struct
d3d10_texture2d
*
This
=
(
struct
d3d10_texture2d
*
)
iface
;
struct
d3d10_texture2d
*
This
=
impl_from_ID3D10Texture2D
(
iface
)
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -166,7 +171,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT
static
void
STDMETHODCALLTYPE
d3d10_texture2d_GetDesc
(
ID3D10Texture2D
*
iface
,
D3D10_TEXTURE2D_DESC
*
desc
)
{
struct
d3d10_texture2d
*
This
=
(
struct
d3d10_texture2d
*
)
iface
;
struct
d3d10_texture2d
*
This
=
impl_from_ID3D10Texture2D
(
iface
)
;
TRACE
(
"iface %p, desc %p
\n
"
,
iface
,
desc
);
...
...
@@ -204,7 +209,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
{
HRESULT
hr
;
texture
->
v
tbl
=
&
d3d10_texture2d_vtbl
;
texture
->
ID3D10Texture2D_iface
.
lpV
tbl
=
&
d3d10_texture2d_vtbl
;
texture
->
refcount
=
1
;
texture
->
desc
=
*
desc
;
...
...
@@ -220,7 +225,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
}
hr
=
IWineDXGIDevice_create_surface
(
wine_device
,
NULL
,
0
,
NULL
,
(
IUnknown
*
)
textur
e
,
(
void
**
)
&
texture
->
dxgi_surface
);
(
IUnknown
*
)
&
texture
->
ID3D10Texture2D_ifac
e
,
(
void
**
)
&
texture
->
dxgi_surface
);
IWineDXGIDevice_Release
(
wine_device
);
if
(
FAILED
(
hr
))
{
...
...
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