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
467b1dd3
Commit
467b1dd3
authored
Dec 18, 2006
by
Markus Amsler
Committed by
Alexandre Julliard
Dec 18, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Handle surface container in d3d9.
parent
87083c9d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
21 deletions
+9
-21
d3d9_private.h
dlls/d3d9/d3d9_private.h
+3
-0
device.c
dlls/d3d9/device.c
+1
-0
directx.c
dlls/d3d9/directx.c
+2
-0
surface.c
dlls/d3d9/surface.c
+3
-21
No files found.
dlls/d3d9/d3d9_private.h
View file @
467b1dd3
...
...
@@ -310,6 +310,9 @@ typedef struct IDirect3DSurface9Impl
/* Parent reference */
LPDIRECT3DDEVICE9
parentDevice
;
/* The surface container */
IUnknown
*
container
;
/* If set forward refcounting to this object */
IUnknown
*
forwardReference
;
...
...
dlls/d3d9/device.c
View file @
467b1dd3
...
...
@@ -1013,6 +1013,7 @@ HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT
if
(
SUCCEEDED
(
res
))
{
*
ppSurface
=
d3dSurface
->
wineD3DSurface
;
d3dSurface
->
container
=
pSuperior
;
IUnknown_Release
(
d3dSurface
->
parentDevice
);
d3dSurface
->
parentDevice
=
NULL
;
d3dSurface
->
forwardReference
=
pSuperior
;
...
...
dlls/d3d9/directx.c
View file @
467b1dd3
...
...
@@ -189,6 +189,7 @@ HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior,
if
(
SUCCEEDED
(
res
))
{
*
ppSurface
=
d3dSurface
->
wineD3DSurface
;
d3dSurface
->
container
=
pSuperior
;
d3dSurface
->
isImplicit
=
TRUE
;
/* Implicit surfaces are created with an refcount of 0 */
IUnknown_Release
((
IUnknown
*
)
d3dSurface
);
...
...
@@ -285,6 +286,7 @@ HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSup
(
IDirect3DSurface9
**
)
&
d3dSurface
,
pSharedHandle
);
if
(
SUCCEEDED
(
res
))
{
*
ppSurface
=
d3dSurface
->
wineD3DSurface
;
d3dSurface
->
container
=
device
;
d3dSurface
->
isImplicit
=
TRUE
;
/* Implicit surfaces are created with an refcount of 0 */
IUnknown_Release
((
IUnknown
*
)
d3dSurface
);
...
...
dlls/d3d9/surface.c
View file @
467b1dd3
...
...
@@ -139,35 +139,17 @@ static D3DRESOURCETYPE WINAPI IDirect3DSurface9Impl_GetType(LPDIRECT3DSURFACE9 i
/* IDirect3DSurface9 Interface follow: */
static
HRESULT
WINAPI
IDirect3DSurface9Impl_GetContainer
(
LPDIRECT3DSURFACE9
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
IWineD3DBase
*
wineD3DContainer
=
NULL
;
IUnknown
*
wineD3DContainerParent
=
NULL
;
HRESULT
res
;
TRACE
(
"(This %p, riid %s, ppContainer %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppContainer
);
if
(
!
This
->
container
)
return
E_NOINTERFACE
;
if
(
!
ppContainer
)
{
ERR
(
"Called without a valid ppContainer
\n
"
);
}
/* Get the WineD3D container. */
res
=
IWineD3DSurface_GetContainer
(
This
->
wineD3DSurface
,
&
IID_IWineD3DBase
,
(
void
**
)
&
wineD3DContainer
);
if
(
res
!=
D3D_OK
)
return
res
;
if
(
!
wineD3DContainer
)
{
ERR
(
"IWineD3DSurface_GetContainer should never return NULL
\n
"
);
}
/* Get the parent */
IWineD3DBase_GetParent
(
wineD3DContainer
,
&
wineD3DContainerParent
);
IUnknown_Release
(
wineD3DContainer
);
if
(
!
wineD3DContainerParent
)
{
ERR
(
"IWineD3DBase_GetParent should never return NULL
\n
"
);
}
/* Now, query the interface of the parent for the riid */
res
=
IUnknown_QueryInterface
(
wineD3DContainerParent
,
riid
,
ppContainer
);
IUnknown_Release
(
wineD3DContainerParent
);
res
=
IUnknown_QueryInterface
(
This
->
container
,
riid
,
ppContainer
);
TRACE
(
"Returning ppContainer %p, *ppContainer %p
\n
"
,
ppContainer
,
*
ppContainer
);
...
...
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