Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0dd6b20a
Commit
0dd6b20a
authored
Jun 21, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Implement IDirect3DSurface9 private data handling on top of wined3d_resource.
parent
a7cc9441
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
12 deletions
+28
-12
surface.c
dlls/d3d9/surface.c
+28
-12
No files found.
dlls/d3d9/surface.c
View file @
0dd6b20a
...
...
@@ -24,6 +24,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d9
);
static
inline
IDirect3DSurface9Impl
*
impl_from_IDirect3DSurface9
(
IDirect3DSurface9
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DSurface9Impl
,
lpVtbl
);
}
/* IDirect3DSurface9 IUnknown parts follow: */
static
HRESULT
WINAPI
IDirect3DSurface9Impl_QueryInterface
(
LPDIRECT3DSURFACE9
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
...
...
@@ -133,42 +138,53 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetDevice(IDirect3DSurface9 *iface,
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DSurface9Impl_SetPrivateData
(
LPDIRECT3DSURFACE9
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface9Impl_SetPrivateData
(
IDirect3DSurface9
*
iface
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
)
{
IDirect3DSurface9Impl
*
surface
=
impl_from_IDirect3DSurface9
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %u, flags %#x.
\n
"
,
iface
,
debugstr_guid
(
refguid
),
pData
,
SizeOfData
,
F
lags
);
iface
,
debugstr_guid
(
guid
),
data
,
data_size
,
f
lags
);
wined3d_mutex_lock
();
hr
=
wined3d_surface_set_private_data
(
This
->
wined3d_surface
,
refguid
,
pData
,
SizeOfData
,
Flags
);
resource
=
wined3d_surface_get_resource
(
surface
->
wined3d_surface
);
hr
=
wined3d_resource_set_private_data
(
resource
,
guid
,
data
,
data_size
,
flags
);
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DSurface9Impl_GetPrivateData
(
LPDIRECT3DSURFACE9
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
)
{
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface9Impl_GetPrivateData
(
IDirect3DSurface9
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
{
IDirect3DSurface9Impl
*
surface
=
impl_from_IDirect3DSurface9
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data %p, data_size %p.
\n
"
,
iface
,
debugstr_guid
(
refguid
),
pData
,
pSizeOfData
);
iface
,
debugstr_guid
(
guid
),
data
,
data_size
);
wined3d_mutex_lock
();
hr
=
wined3d_surface_get_private_data
(
This
->
wined3d_surface
,
refguid
,
pData
,
pSizeOfData
);
resource
=
wined3d_surface_get_resource
(
surface
->
wined3d_surface
);
hr
=
wined3d_resource_get_private_data
(
resource
,
guid
,
data
,
data_size
);
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DSurface9Impl_FreePrivateData
(
LPDIRECT3DSURFACE9
iface
,
REFGUID
refguid
)
{
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface9Impl_FreePrivateData
(
IDirect3DSurface9
*
iface
,
REFGUID
guid
)
{
IDirect3DSurface9Impl
*
surface
=
impl_from_IDirect3DSurface9
(
iface
);
struct
wined3d_resource
*
resource
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
ref
guid
));
TRACE
(
"iface %p, guid %s.
\n
"
,
iface
,
debugstr_guid
(
guid
));
wined3d_mutex_lock
();
hr
=
wined3d_surface_free_private_data
(
This
->
wined3d_surface
,
refguid
);
resource
=
wined3d_surface_get_resource
(
surface
->
wined3d_surface
);
hr
=
wined3d_resource_free_private_data
(
resource
,
guid
);
wined3d_mutex_unlock
();
return
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