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
d615be8e
Commit
d615be8e
authored
Jul 05, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: COM cleanup for the IDirect3DSurface8 iface.
parent
cce8294f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
24 deletions
+33
-24
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-3
device.c
dlls/d3d8/device.c
+4
-4
surface.c
dlls/d3d8/surface.c
+27
-17
No files found.
dlls/d3d8/d3d8_private.h
View file @
d615be8e
...
...
@@ -240,9 +240,8 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl
*/
struct
IDirect3DSurface8Impl
{
/* IUnknown fields */
const
IDirect3DSurface8Vtbl
*
lpVtbl
;
LONG
ref
;
IDirect3DSurface8
IDirect3DSurface8_iface
;
LONG
ref
;
struct
wined3d_surface
*
wined3d_surface
;
IDirect3DDevice8
*
parentDevice
;
...
...
dlls/d3d8/device.c
View file @
d615be8e
...
...
@@ -905,7 +905,7 @@ static HRESULT IDirect3DDevice8Impl_CreateSurface(IDirect3DDevice8Impl *device,
}
TRACE
(
"Created surface %p.
\n
"
,
object
);
*
ppSurface
=
(
IDirect3DSurface8
*
)
object
;
*
ppSurface
=
&
object
->
IDirect3DSurface8_iface
;
return
D3D_OK
;
}
...
...
@@ -2874,7 +2874,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent *
IUnknown_Release
(
d3d_surface
->
parentDevice
);
d3d_surface
->
parentDevice
=
NULL
;
IDirect3DSurface8_Release
(
(
IDirect3DSurface8
*
)
d3d_sur
face
);
IDirect3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_i
face
);
d3d_surface
->
forwardReference
=
container_parent
;
return
hr
;
...
...
@@ -2907,7 +2907,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par
d3d_surface
->
container
=
(
IUnknown
*
)
&
device
->
IDirect3DDevice8_iface
;
/* Implicit surfaces are created with an refcount of 0 */
I
Unknown_Release
((
IUnknown
*
)
d3d_sur
face
);
I
Direct3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_i
face
);
return
hr
;
}
...
...
@@ -2937,7 +2937,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa
d3d_surface
->
container
=
(
IUnknown
*
)
&
device
->
IDirect3DDevice8_iface
;
/* Implicit surfaces are created with an refcount of 0 */
I
Unknown_Release
((
IUnknown
*
)
d3d_sur
face
);
I
Direct3DSurface8_Release
(
&
d3d_surface
->
IDirect3DSurface8_i
face
);
return
hr
;
}
...
...
dlls/d3d8/surface.c
View file @
d615be8e
...
...
@@ -26,12 +26,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
static
inline
IDirect3DSurface8Impl
*
impl_from_IDirect3DSurface8
(
IDirect3DSurface8
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DSurface8Impl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DSurface8Impl
,
IDirect3DSurface8_iface
);
}
/* IDirect3DSurface8 IUnknown parts follow: */
static
HRESULT
WINAPI
IDirect3DSurface8Impl_QueryInterface
(
LPDIRECT3DSURFACE8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface8Impl_QueryInterface
(
IDirect3DSurface8
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
...
...
@@ -48,8 +50,9 @@ static HRESULT WINAPI IDirect3DSurface8Impl_QueryInterface(LPDIRECT3DSURFACE8 if
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DSurface8Impl_AddRef
(
LPDIRECT3DSURFACE8
iface
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DSurface8Impl_AddRef
(
IDirect3DSurface8
*
iface
)
{
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -75,8 +78,9 @@ static ULONG WINAPI IDirect3DSurface8Impl_AddRef(LPDIRECT3DSURFACE8 iface) {
}
}
static
ULONG
WINAPI
IDirect3DSurface8Impl_Release
(
LPDIRECT3DSURFACE8
iface
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DSurface8Impl_Release
(
IDirect3DSurface8
*
iface
)
{
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -106,9 +110,10 @@ static ULONG WINAPI IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface) {
}
/* IDirect3DSurface8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDevice
(
IDirect3DSurface8
*
iface
,
IDirect3DDevice8
**
device
)
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDevice
(
IDirect3DSurface8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
)
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
...
...
@@ -190,8 +195,10 @@ static HRESULT WINAPI IDirect3DSurface8Impl_FreePrivateData(IDirect3DSurface8 *i
}
/* IDirect3DSurface8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetContainer
(
LPDIRECT3DSURFACE8
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetContainer
(
IDirect3DSurface8
*
iface
,
REFIID
riid
,
void
**
ppContainer
)
{
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
);
HRESULT
res
;
TRACE
(
"iface %p, riid %s, container %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppContainer
);
...
...
@@ -206,7 +213,7 @@ static HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 ifac
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDesc
(
IDirect3DSurface8
*
iface
,
D3DSURFACE_DESC
*
desc
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
)
;
struct
wined3d_resource_desc
wined3d_desc
;
struct
wined3d_resource
*
wined3d_resource
;
...
...
@@ -229,8 +236,10 @@ static HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(IDirect3DSurface8 *iface, D3
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DSurface8Impl_LockRect
(
LPDIRECT3DSURFACE8
iface
,
D3DLOCKED_RECT
*
pLockedRect
,
CONST
RECT
*
pRect
,
DWORD
Flags
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface8Impl_LockRect
(
IDirect3DSurface8
*
iface
,
D3DLOCKED_RECT
*
pLockedRect
,
const
RECT
*
pRect
,
DWORD
Flags
)
{
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, locked_rect %p, rect %p, flags %#x.
\n
"
,
iface
,
pLockedRect
,
pRect
,
Flags
);
...
...
@@ -259,8 +268,9 @@ static HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DSurface8Impl_UnlockRect
(
LPDIRECT3DSURFACE8
iface
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSurface8Impl_UnlockRect
(
IDirect3DSurface8
*
iface
)
{
IDirect3DSurface8Impl
*
This
=
impl_from_IDirect3DSurface8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -310,7 +320,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
{
HRESULT
hr
;
surface
->
lpVtbl
=
&
Direct3DSurface8_Vtbl
;
surface
->
IDirect3DSurface8_iface
.
lpVtbl
=
&
Direct3DSurface8_Vtbl
;
surface
->
ref
=
1
;
/* FIXME: Check MAX bounds of MultisampleQuality. */
...
...
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