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
cce8294f
Commit
cce8294f
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: Use unsafe_impl_from_IDirect3DSurface8 for app provided ifaces.
parent
bdd8459a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
d3d8_private.h
dlls/d3d8/d3d8_private.h
+1
-0
device.c
dlls/d3d8/device.c
+6
-6
surface.c
dlls/d3d8/surface.c
+10
-0
No files found.
dlls/d3d8/d3d8_private.h
View file @
cce8294f
...
...
@@ -256,6 +256,7 @@ struct IDirect3DSurface8Impl
HRESULT
surface_init
(
IDirect3DSurface8Impl
*
surface
,
IDirect3DDevice8Impl
*
device
,
UINT
width
,
UINT
height
,
D3DFORMAT
format
,
BOOL
lockable
,
BOOL
discard
,
UINT
level
,
DWORD
usage
,
D3DPOOL
pool
,
D3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
)
DECLSPEC_HIDDEN
;
IDirect3DSurface8Impl
*
unsafe_impl_from_IDirect3DSurface8
(
IDirect3DSurface8
*
iface
)
DECLSPEC_HIDDEN
;
/* ---------------------- */
/* IDirect3DVertexBuffer8 */
...
...
dlls/d3d8/device.c
View file @
cce8294f
...
...
@@ -451,7 +451,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetCursorProperties(IDirect3DDevice8
UINT
XHotSpot
,
UINT
YHotSpot
,
IDirect3DSurface8
*
pCursorBitmap
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DSurface8Impl
*
pSurface
=
(
IDirect3DSurface8Impl
*
)
pCursorBitmap
;
IDirect3DSurface8Impl
*
pSurface
=
unsafe_impl_from_IDirect3DSurface8
(
pCursorBitmap
)
;
HRESULT
hr
;
TRACE
(
"iface %p, hotspot_x %u, hotspot_y %u, bitmap %p.
\n
"
,
...
...
@@ -965,8 +965,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
IDirect3DSurface8
*
pSourceSurface
,
const
RECT
*
pSourceRects
,
UINT
cRects
,
IDirect3DSurface8
*
pDestinationSurface
,
const
POINT
*
pDestPoints
)
{
IDirect3DSurface8Impl
*
Source
=
(
IDirect3DSurface8Impl
*
)
pSourceSurface
;
IDirect3DSurface8Impl
*
Dest
=
(
IDirect3DSurface8Impl
*
)
pDestinationSurface
;
IDirect3DSurface8Impl
*
Source
=
unsafe_impl_from_IDirect3DSurface8
(
pSourceSurface
)
;
IDirect3DSurface8Impl
*
Dest
=
unsafe_impl_from_IDirect3DSurface8
(
pDestinationSurface
)
;
enum
wined3d_format_id
srcFormat
,
destFormat
;
struct
wined3d_resource_desc
wined3d_desc
;
struct
wined3d_resource
*
wined3d_resource
;
...
...
@@ -1053,7 +1053,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetFrontBuffer(IDirect3DDevice8 *ifac
IDirect3DSurface8
*
pDestSurface
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DSurface8Impl
*
destSurface
=
(
IDirect3DSurface8Impl
*
)
pDestSurface
;
IDirect3DSurface8Impl
*
destSurface
=
unsafe_impl_from_IDirect3DSurface8
(
pDestSurface
)
;
HRESULT
hr
;
TRACE
(
"iface %p, dst_surface %p.
\n
"
,
iface
,
pDestSurface
);
...
...
@@ -1074,8 +1074,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(IDirect3DDevice8 *ifa
IDirect3DSurface8
*
pRenderTarget
,
IDirect3DSurface8
*
pNewZStencil
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DSurface8Impl
*
pSurface
=
(
IDirect3DSurface8Impl
*
)
pRenderTarget
;
IDirect3DSurface8Impl
*
pZSurface
=
(
IDirect3DSurface8Impl
*
)
pNewZStencil
;
IDirect3DSurface8Impl
*
pSurface
=
unsafe_impl_from_IDirect3DSurface8
(
pRenderTarget
)
;
IDirect3DSurface8Impl
*
pZSurface
=
unsafe_impl_from_IDirect3DSurface8
(
pNewZStencil
)
;
struct
wined3d_surface
*
original_ds
=
NULL
;
HRESULT
hr
;
...
...
dlls/d3d8/surface.c
View file @
cce8294f
...
...
@@ -19,6 +19,7 @@
*/
#include "config.h"
#include <assert.h>
#include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
...
...
@@ -335,3 +336,12 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
return
D3D_OK
;
}
IDirect3DSurface8Impl
*
unsafe_impl_from_IDirect3DSurface8
(
IDirect3DSurface8
*
iface
)
{
if
(
!
iface
)
return
NULL
;
assert
(
iface
->
lpVtbl
==
&
Direct3DSurface8_Vtbl
);
return
impl_from_IDirect3DSurface8
(
iface
);
}
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