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
7524258a
Commit
7524258a
authored
Dec 05, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Implement flips inside ddraw.
parent
f637c229
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
27 deletions
+43
-27
surface.c
dlls/ddraw/surface.c
+36
-2
resource.c
dlls/wined3d/resource.c
+5
-0
surface.c
dlls/wined3d/surface.c
+0
-23
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+1
-1
No files found.
dlls/ddraw/surface.c
View file @
7524258a
...
...
@@ -1175,6 +1175,8 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
struct
ddraw_surface
*
dst_impl
=
impl_from_IDirectDrawSurface7
(
iface
);
struct
ddraw_surface
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface7
(
src
);
DDSCAPS2
caps
=
{
DDSCAPS_FLIP
,
0
,
0
,
0
};
struct
wined3d_surface
*
tmp
,
*
rt
;
struct
wined3d_texture
*
texture
;
IDirectDrawSurface7
*
current
;
HRESULT
hr
;
...
...
@@ -1185,6 +1187,10 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
wined3d_mutex_lock
();
tmp
=
dst_impl
->
wined3d_surface
;
texture
=
dst_impl
->
wined3d_texture
;
rt
=
wined3d_device_get_render_target
(
dst_impl
->
ddraw
->
wined3d_device
,
0
);
if
(
src_impl
)
{
for
(
current
=
iface
;
current
!=
src
;)
...
...
@@ -1216,9 +1222,37 @@ static HRESULT WINAPI ddraw_surface7_Flip(IDirectDrawSurface7 *iface, IDirectDra
ddraw_surface7_Release
(
current
);
}
if
(
SUCCEEDED
(
hr
=
wined3d_surface_flip
(
dst_impl
->
wined3d_surface
,
src_impl
->
wined3d_surface
,
flags
))
&&
(
dst_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
))
if
(
rt
==
dst_impl
->
wined3d_surface
)
wined3d_device_set_render_target
(
dst_impl
->
ddraw
->
wined3d_device
,
0
,
src_impl
->
wined3d_surface
,
FALSE
);
wined3d_resource_set_parent
(
wined3d_surface_get_resource
(
src_impl
->
wined3d_surface
),
dst_impl
);
dst_impl
->
wined3d_surface
=
src_impl
->
wined3d_surface
;
wined3d_resource_set_parent
(
wined3d_texture_get_resource
(
src_impl
->
wined3d_texture
),
wined3d_texture_get_parent
(
dst_impl
->
wined3d_texture
));
dst_impl
->
wined3d_texture
=
src_impl
->
wined3d_texture
;
/* We don't have to worry about potential texture bindings, since
* flippable surfaces can never be textures. */
if
(
rt
==
src_impl
->
wined3d_surface
)
wined3d_device_set_render_target
(
dst_impl
->
ddraw
->
wined3d_device
,
0
,
tmp
,
FALSE
);
wined3d_resource_set_parent
(
wined3d_surface_get_resource
(
tmp
),
src_impl
);
src_impl
->
wined3d_surface
=
tmp
;
wined3d_resource_set_parent
(
wined3d_texture_get_resource
(
texture
),
wined3d_texture_get_parent
(
src_impl
->
wined3d_texture
));
src_impl
->
wined3d_texture
=
texture
;
if
(
flags
)
{
static
UINT
once
;
if
(
!
once
++
)
FIXME
(
"Ignoring flags %#x.
\n
"
,
flags
);
else
WARN
(
"Ignoring flags %#x.
\n
"
,
flags
);
}
if
(
dst_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
hr
=
ddraw_surface_update_frontbuffer
(
dst_impl
,
NULL
,
FALSE
);
else
hr
=
DD_OK
;
wined3d_mutex_unlock
();
...
...
dlls/wined3d/resource.c
View file @
7524258a
...
...
@@ -328,6 +328,11 @@ void * CDECL wined3d_resource_get_parent(const struct wined3d_resource *resource
return
resource
->
parent
;
}
void
CDECL
wined3d_resource_set_parent
(
struct
wined3d_resource
*
resource
,
void
*
parent
)
{
resource
->
parent
=
parent
;
}
void
CDECL
wined3d_resource_get_desc
(
const
struct
wined3d_resource
*
resource
,
struct
wined3d_resource_desc
*
desc
)
{
desc
->
resource_type
=
resource
->
type
;
...
...
dlls/wined3d/surface.c
View file @
7524258a
...
...
@@ -3414,29 +3414,6 @@ HRESULT CDECL wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc)
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_surface_flip
(
struct
wined3d_surface
*
surface
,
struct
wined3d_surface
*
override
,
DWORD
flags
)
{
TRACE
(
"surface %p, override %p, flags %#x.
\n
"
,
surface
,
override
,
flags
);
if
(
flags
)
{
static
UINT
once
;
if
(
!
once
++
)
FIXME
(
"Ignoring flags %#x.
\n
"
,
flags
);
else
WARN
(
"Ignoring flags %#x.
\n
"
,
flags
);
}
if
(
surface
->
swapchain
)
{
ERR
(
"Not supported on swapchain surfaces.
\n
"
);
return
WINEDDERR_NOTFLIPPABLE
;
}
flip_surface
(
surface
,
override
);
return
WINED3D_OK
;
}
static
void
read_from_framebuffer
(
struct
wined3d_surface
*
surface
)
{
struct
wined3d_device
*
device
=
surface
->
resource
.
device
;
...
...
dlls/wined3d/wined3d.spec
View file @
7524258a
...
...
@@ -176,6 +176,7 @@
@ cdecl wined3d_resource_get_desc(ptr ptr)
@ cdecl wined3d_resource_get_parent(ptr)
@ cdecl wined3d_resource_get_private_data(ptr ptr ptr ptr)
@ cdecl wined3d_resource_set_parent(ptr ptr)
@ cdecl wined3d_resource_set_private_data(ptr ptr ptr long long)
@ cdecl wined3d_rendertarget_view_create(ptr ptr ptr)
...
...
@@ -206,7 +207,6 @@
@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long)
@ cdecl wined3d_surface_decref(ptr)
@ cdecl wined3d_surface_flip(ptr ptr long)
@ cdecl wined3d_surface_from_resource(ptr)
@ cdecl wined3d_surface_get_blt_status(ptr long)
@ cdecl wined3d_surface_get_flip_status(ptr long)
...
...
include/wine/wined3d.h
View file @
7524258a
...
...
@@ -2261,6 +2261,7 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
void
*
__cdecl
wined3d_resource_get_parent
(
const
struct
wined3d_resource
*
resource
);
HRESULT
__cdecl
wined3d_resource_get_private_data
(
const
struct
wined3d_resource
*
resource
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
);
void
__cdecl
wined3d_resource_set_parent
(
struct
wined3d_resource
*
resource
,
void
*
parent
);
HRESULT
__cdecl
wined3d_resource_set_private_data
(
struct
wined3d_resource
*
resource
,
REFGUID
guid
,
const
void
*
data
,
DWORD
data_size
,
DWORD
flags
);
...
...
@@ -2304,7 +2305,6 @@ HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const R
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
DWORD
flags
,
const
WINEDDBLTFX
*
blt_fx
,
enum
wined3d_texture_filter_type
filter
);
ULONG
__cdecl
wined3d_surface_decref
(
struct
wined3d_surface
*
surface
);
HRESULT
__cdecl
wined3d_surface_flip
(
struct
wined3d_surface
*
surface
,
struct
wined3d_surface
*
override
,
DWORD
flags
);
struct
wined3d_surface
*
__cdecl
wined3d_surface_from_resource
(
struct
wined3d_resource
*
resource
);
HRESULT
__cdecl
wined3d_surface_get_blt_status
(
const
struct
wined3d_surface
*
surface
,
DWORD
flags
);
HRESULT
__cdecl
wined3d_surface_get_flip_status
(
const
struct
wined3d_surface
*
surface
,
DWORD
flags
);
...
...
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