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
0c11c316
Commit
0c11c316
authored
Mar 14, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 15, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Get rid of IDirect3DViewportImpl.
parent
ddfb19e9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
32 deletions
+31
-32
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
ddraw_private.h
dlls/ddraw/ddraw_private.h
+9
-10
device.c
dlls/ddraw/device.c
+15
-15
executebuffer.c
dlls/ddraw/executebuffer.c
+6
-6
viewport.c
dlls/ddraw/viewport.c
+0
-0
No files found.
dlls/ddraw/ddraw.c
View file @
0c11c316
...
...
@@ -4271,7 +4271,7 @@ static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3
IUnknown
*
outer_unknown
)
{
struct
ddraw
*
ddraw
=
impl_from_IDirect3D3
(
iface
);
IDirect3DViewportImpl
*
object
;
struct
d3d_viewport
*
object
;
TRACE
(
"iface %p, viewport %p, outer_unknown %p.
\n
"
,
iface
,
viewport
,
outer_unknown
);
...
...
dlls/ddraw/ddraw_private.h
View file @
0c11c316
...
...
@@ -42,7 +42,6 @@ extern const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops DECLSPEC_HI
/* Typdef the interfaces */
typedef
struct
IDirect3DDeviceImpl
IDirect3DDeviceImpl
;
typedef
struct
IDirect3DViewportImpl
IDirect3DViewportImpl
;
typedef
struct
IDirect3DMaterialImpl
IDirect3DMaterialImpl
;
typedef
struct
IDirect3DExecuteBufferImpl
IDirect3DExecuteBufferImpl
;
typedef
struct
IDirect3DVertexBufferImpl
IDirect3DVertexBufferImpl
;
...
...
@@ -290,7 +289,7 @@ struct IDirect3DDeviceImpl
/* Viewport management */
struct
list
viewport_list
;
IDirect3DViewportImpl
*
current_viewport
;
struct
d3d_viewport
*
current_viewport
;
D3DVIEWPORT7
active_viewport
;
/* Required to keep track which of two available texture blending modes in d3ddevice3 is used */
...
...
@@ -410,7 +409,7 @@ struct d3d_light
struct
ddraw
*
ddraw
;
/* If this light is active for one viewport, put the viewport here */
IDirect3DViewportImpl
*
active_viewport
;
struct
d3d_viewport
*
active_viewport
;
D3DLIGHT2
light
;
D3DLIGHT7
light7
;
...
...
@@ -451,7 +450,7 @@ IDirect3DMaterialImpl *d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN;
/*****************************************************************************
* IDirect3DViewport - Wraps to D3D7
*****************************************************************************/
struct
IDirect3DViewportImpl
struct
d3d_viewport
{
IDirect3DViewport3
IDirect3DViewport3_iface
;
LONG
ref
;
...
...
@@ -480,13 +479,13 @@ struct IDirect3DViewportImpl
IDirect3DMaterialImpl
*
background
;
};
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport3
(
IDirect3DViewport3
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport2
(
IDirect3DViewport2
*
iface
)
DECLSPEC_HIDDEN
;
IDirect3DViewportImpl
*
unsafe_impl_from_IDirect3DViewport
(
IDirect3DViewport
*
iface
)
DECLSPEC_HIDDEN
;
struct
d3d_viewport
*
unsafe_impl_from_IDirect3DViewport3
(
IDirect3DViewport3
*
iface
)
DECLSPEC_HIDDEN
;
struct
d3d_viewport
*
unsafe_impl_from_IDirect3DViewport2
(
IDirect3DViewport2
*
iface
)
DECLSPEC_HIDDEN
;
struct
d3d_viewport
*
unsafe_impl_from_IDirect3DViewport
(
IDirect3DViewport
*
iface
)
DECLSPEC_HIDDEN
;
/* Helper functions */
void
viewport_activate
(
IDirect3DViewportImpl
*
This
,
BOOL
ignore_lights
)
DECLSPEC_HIDDEN
;
void
d3d_viewport_init
(
IDirect3DViewportImpl
*
viewport
,
struct
ddraw
*
ddraw
)
DECLSPEC_HIDDEN
;
void
viewport_activate
(
struct
d3d_viewport
*
viewport
,
BOOL
ignore_lights
)
DECLSPEC_HIDDEN
;
void
d3d_viewport_init
(
struct
d3d_viewport
*
viewport
,
struct
ddraw
*
ddraw
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirect3DExecuteBuffer - Wraps to D3D7
...
...
@@ -519,7 +518,7 @@ IDirect3DExecuteBufferImpl *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExe
/* The execute function */
HRESULT
d3d_execute_buffer_execute
(
IDirect3DExecuteBufferImpl
*
execute_buffer
,
IDirect3DDeviceImpl
*
device
,
IDirect3DViewportImpl
*
viewport
)
DECLSPEC_HIDDEN
;
IDirect3DDeviceImpl
*
device
,
struct
d3d_viewport
*
viewport
)
DECLSPEC_HIDDEN
;
/*****************************************************************************
* IDirect3DVertexBuffer
...
...
dlls/ddraw/device.c
View file @
0c11c316
...
...
@@ -778,7 +778,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface,
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
IDirect3DExecuteBufferImpl
*
buffer
=
unsafe_impl_from_IDirect3DExecuteBuffer
(
ExecuteBuffer
);
IDirect3DViewportImpl
*
Direct3DViewportI
mpl
=
unsafe_impl_from_IDirect3DViewport
(
Viewport
);
struct
d3d_viewport
*
viewport_i
mpl
=
unsafe_impl_from_IDirect3DViewport
(
Viewport
);
HRESULT
hr
;
TRACE
(
"iface %p, buffer %p, viewport %p, flags %#x.
\n
"
,
iface
,
ExecuteBuffer
,
Viewport
,
Flags
);
...
...
@@ -788,7 +788,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_Execute(IDirect3DDevice *iface,
/* Execute... */
wined3d_mutex_lock
();
hr
=
d3d_execute_buffer_execute
(
buffer
,
This
,
Direct3DViewportI
mpl
);
hr
=
d3d_execute_buffer_execute
(
buffer
,
This
,
viewport_i
mpl
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -816,7 +816,7 @@ IDirect3DDeviceImpl_3_AddViewport(IDirect3DDevice3 *iface,
IDirect3DViewport3
*
Viewport
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
Viewport
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
Viewport
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Viewport
);
...
...
@@ -837,7 +837,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_AddViewport(IDirect3DDevice2 *iface,
IDirect3DViewport2
*
Direct3DViewport2
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport2
);
...
...
@@ -848,7 +848,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_AddViewport(IDirect3DDevice *iface,
IDirect3DViewport
*
Direct3DViewport
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Direct3DViewport
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Direct3DViewport
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport
);
...
...
@@ -874,7 +874,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_AddViewport(IDirect3DDevice *iface,
static
HRESULT
WINAPI
IDirect3DDeviceImpl_3_DeleteViewport
(
IDirect3DDevice3
*
iface
,
IDirect3DViewport3
*
viewport
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
viewport
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
viewport
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
viewport
);
...
...
@@ -899,7 +899,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_DeleteViewport(IDirect3DDevice2 *ifa
IDirect3DViewport2
*
Direct3DViewport2
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport2
);
...
...
@@ -910,7 +910,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_DeleteViewport(IDirect3DDevice *ifac
IDirect3DViewport
*
Direct3DViewport
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Direct3DViewport
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Direct3DViewport
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport
);
...
...
@@ -942,8 +942,8 @@ IDirect3DDeviceImpl_3_NextViewport(IDirect3DDevice3 *iface,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
Viewport3
);
IDirect3DViewportImpl
*
next
;
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
Viewport3
);
struct
d3d_viewport
*
next
;
struct
list
*
entry
;
TRACE
(
"iface %p, viewport %p, next %p, flags %#x.
\n
"
,
...
...
@@ -980,7 +980,7 @@ IDirect3DDeviceImpl_3_NextViewport(IDirect3DDevice3 *iface,
if
(
entry
)
{
next
=
LIST_ENTRY
(
entry
,
IDirect3DViewportImpl
,
entry
);
next
=
LIST_ENTRY
(
entry
,
struct
d3d_viewport
,
entry
);
*
lplpDirect3DViewport3
=
&
next
->
IDirect3DViewport3_iface
;
}
else
...
...
@@ -995,7 +995,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_NextViewport(IDirect3DDevice2 *iface
IDirect3DViewport2
*
Viewport2
,
IDirect3DViewport2
**
lplpDirect3DViewport2
,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Viewport2
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Viewport2
);
IDirect3DViewport3
*
res
;
HRESULT
hr
;
...
...
@@ -1012,7 +1012,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_1_NextViewport(IDirect3DDevice *iface,
IDirect3DViewport
*
Viewport
,
IDirect3DViewport
**
lplpDirect3DViewport
,
DWORD
Flags
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Viewport
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport
(
Viewport
);
IDirect3DViewport3
*
res
;
HRESULT
hr
;
...
...
@@ -1787,7 +1787,7 @@ IDirect3DDeviceImpl_3_SetCurrentViewport(IDirect3DDevice3 *iface,
IDirect3DViewport3
*
Direct3DViewport3
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice3
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
Direct3DViewport3
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport3
(
Direct3DViewport3
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport3
);
...
...
@@ -1830,7 +1830,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_SetCurrentViewport(IDirect3DDevice2
IDirect3DViewport2
*
Direct3DViewport2
)
{
IDirect3DDeviceImpl
*
This
=
impl_from_IDirect3DDevice2
(
iface
);
IDirect3DViewportImpl
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
);
struct
d3d_viewport
*
vp
=
unsafe_impl_from_IDirect3DViewport2
(
Direct3DViewport2
);
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport2
);
...
...
dlls/ddraw/executebuffer.c
View file @
0c11c316
...
...
@@ -69,7 +69,7 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
*
*****************************************************************************/
HRESULT
d3d_execute_buffer_execute
(
IDirect3DExecuteBufferImpl
*
This
,
IDirect3DDeviceImpl
*
lpDevice
,
IDirect3DViewportImpl
*
lpV
iewport
)
IDirect3DDeviceImpl
*
lpDevice
,
struct
d3d_viewport
*
v
iewport
)
{
/* DWORD bs = This->desc.dwBufferSize; */
DWORD
vs
=
This
->
data
.
dwVertexOffset
;
...
...
@@ -79,15 +79,15 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
char
*
instr
=
(
char
*
)
This
->
desc
.
lpData
+
is
;
if
(
lpV
iewport
->
active_device
!=
lpDevice
)
if
(
v
iewport
->
active_device
!=
lpDevice
)
{
WARN
(
"Viewport %p active device is %p.
\n
"
,
lpViewport
,
lpV
iewport
->
active_device
);
viewport
,
v
iewport
->
active_device
);
return
DDERR_INVALIDPARAMS
;
}
/* Activate the viewport */
viewport_activate
(
lpV
iewport
,
FALSE
);
viewport_activate
(
v
iewport
,
FALSE
);
TRACE
(
"ExecuteData :
\n
"
);
if
(
TRACE_ON
(
ddraw
))
...
...
@@ -376,8 +376,8 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
unsigned
int
nb
;
D3DVERTEX
*
src
=
((
LPD3DVERTEX
)
((
char
*
)
This
->
desc
.
lpData
+
vs
))
+
ci
->
wStart
;
D3DTLVERTEX
*
dst
=
((
LPD3DTLVERTEX
)
(
This
->
vertex_data
))
+
ci
->
wDest
;
D3DVIEWPORT
*
Viewport
=
&
viewport
->
viewports
.
vp1
;
D3DMATRIX
mat
;
D3DVIEWPORT
*
Viewport
=
&
lpViewport
->
viewports
.
vp1
;
if
(
TRACE_ON
(
ddraw
))
{
...
...
@@ -421,8 +421,8 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
unsigned
int
nb
;
D3DLVERTEX
*
src
=
((
LPD3DLVERTEX
)
((
char
*
)
This
->
desc
.
lpData
+
vs
))
+
ci
->
wStart
;
D3DTLVERTEX
*
dst
=
((
LPD3DTLVERTEX
)
(
This
->
vertex_data
))
+
ci
->
wDest
;
D3DVIEWPORT
*
Viewport
=
&
viewport
->
viewports
.
vp1
;
D3DMATRIX
mat
;
D3DVIEWPORT
*
Viewport
=
&
lpViewport
->
viewports
.
vp1
;
if
(
TRACE_ON
(
ddraw
))
{
...
...
dlls/ddraw/viewport.c
View file @
0c11c316
This diff is collapsed.
Click to expand it.
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