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
219a8302
Commit
219a8302
authored
Jun 07, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: COM cleanup for the IDXGISurface iface.
parent
2486da82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
surface.c
dlls/dxgi/surface.c
+14
-8
No files found.
dlls/dxgi/dxgi_private.h
View file @
219a8302
...
...
@@ -135,7 +135,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
/* IDXGISurface */
struct
dxgi_surface
{
const
struct
IDXGISurfaceVtbl
*
vtbl
;
IDXGISurface
IDXGISurface_iface
;
const
struct
IUnknownVtbl
*
inner_unknown_vtbl
;
IUnknown
*
outer_unknown
;
LONG
refcount
;
...
...
dlls/dxgi/surface.c
View file @
219a8302
...
...
@@ -42,7 +42,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_inner_QueryInterface(IUnknown *ifa
||
IsEqualGUID
(
riid
,
&
IID_IDXGIObject
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
I
Unknown_AddRef
((
IUnknown
*
)
This
);
I
DXGISurface_AddRef
(
&
This
->
IDXGISurface_iface
);
*
object
=
This
;
return
S_OK
;
}
...
...
@@ -79,25 +79,31 @@ static ULONG STDMETHODCALLTYPE dxgi_surface_inner_Release(IUnknown *iface)
return
refcount
;
}
static
inline
struct
dxgi_surface
*
impl_from_IDXGISurface
(
IDXGISurface
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dxgi_surface
,
IDXGISurface_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_surface_QueryInterface
(
IDXGISurface
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
STDMETHODCALLTYPE
dxgi_surface_QueryInterface
(
IDXGISurface
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
dxgi_surface
*
This
=
(
struct
dxgi_surface
*
)
iface
;
struct
dxgi_surface
*
This
=
impl_from_IDXGISurface
(
iface
)
;
TRACE
(
"Forwarding to outer IUnknown
\n
"
);
return
IUnknown_QueryInterface
(
This
->
outer_unknown
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
dxgi_surface_AddRef
(
IDXGISurface
*
iface
)
{
struct
dxgi_surface
*
This
=
(
struct
dxgi_surface
*
)
iface
;
struct
dxgi_surface
*
This
=
impl_from_IDXGISurface
(
iface
)
;
TRACE
(
"Forwarding to outer IUnknown
\n
"
);
return
IUnknown_AddRef
(
This
->
outer_unknown
);
}
static
ULONG
STDMETHODCALLTYPE
dxgi_surface_Release
(
IDXGISurface
*
iface
)
{
struct
dxgi_surface
*
This
=
(
struct
dxgi_surface
*
)
iface
;
struct
dxgi_surface
*
This
=
impl_from_IDXGISurface
(
iface
)
;
TRACE
(
"Forwarding to outer IUnknown
\n
"
);
return
IUnknown_Release
(
This
->
outer_unknown
);
}
...
...
@@ -130,7 +136,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_GetPrivateData(IDXGISurface *iface
static
HRESULT
STDMETHODCALLTYPE
dxgi_surface_GetParent
(
IDXGISurface
*
iface
,
REFIID
riid
,
void
**
parent
)
{
struct
dxgi_surface
*
This
=
(
struct
dxgi_surface
*
)
iface
;
struct
dxgi_surface
*
This
=
impl_from_IDXGISurface
(
iface
)
;
TRACE
(
"iface %p, riid %s, parent %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
parent
);
...
...
@@ -141,7 +147,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_surface_GetParent(IDXGISurface *iface, REF
static
HRESULT
STDMETHODCALLTYPE
dxgi_surface_GetDevice
(
IDXGISurface
*
iface
,
REFIID
riid
,
void
**
device
)
{
struct
dxgi_surface
*
This
=
(
struct
dxgi_surface
*
)
iface
;
struct
dxgi_surface
*
This
=
impl_from_IDXGISurface
(
iface
)
;
TRACE
(
"iface %p, riid %s, device %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
device
);
...
...
@@ -199,7 +205,7 @@ static const struct IUnknownVtbl dxgi_surface_inner_unknown_vtbl =
HRESULT
dxgi_surface_init
(
struct
dxgi_surface
*
surface
,
IDXGIDevice
*
device
,
IUnknown
*
outer
)
{
surface
->
v
tbl
=
&
dxgi_surface_vtbl
;
surface
->
IDXGISurface_iface
.
lpV
tbl
=
&
dxgi_surface_vtbl
;
surface
->
inner_unknown_vtbl
=
&
dxgi_surface_inner_unknown_vtbl
;
surface
->
refcount
=
1
;
surface
->
outer_unknown
=
outer
?
outer
:
(
IUnknown
*
)
&
surface
->
inner_unknown_vtbl
;
...
...
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