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
ea85a1ca
Commit
ea85a1ca
authored
Feb 05, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce wined3d_texture_set_overlay_position().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6e30b042
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
28 deletions
+35
-28
surface.c
dlls/ddraw/surface.c
+4
-3
surface.c
dlls/wined3d/surface.c
+0
-22
texture.c
dlls/wined3d/texture.c
+27
-0
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+3
-2
No files found.
dlls/ddraw/surface.c
View file @
ea85a1ca
...
...
@@ -3625,15 +3625,16 @@ static HRESULT WINAPI ddraw_surface1_Restore(IDirectDrawSurface *iface)
* Returns:
* DDERR_NOTAOVERLAYSURFACE, because we don't support overlays right now
*****************************************************************************/
static
HRESULT
WINAPI
ddraw_surface7_SetOverlayPosition
(
IDirectDrawSurface7
*
iface
,
LONG
X
,
LONG
Y
)
static
HRESULT
WINAPI
ddraw_surface7_SetOverlayPosition
(
IDirectDrawSurface7
*
iface
,
LONG
x
,
LONG
y
)
{
struct
ddraw_surface
*
surface
=
impl_from_IDirectDrawSurface7
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, x %d, y %d.
\n
"
,
iface
,
X
,
Y
);
TRACE
(
"iface %p, x %d, y %d.
\n
"
,
iface
,
x
,
y
);
wined3d_mutex_lock
();
hr
=
wined3d_surface_set_overlay_position
(
surface
->
wined3d_surface
,
X
,
Y
);
hr
=
wined3d_texture_set_overlay_position
(
surface
->
wined3d_texture
,
surface
->
sub_resource_idx
,
x
,
y
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/wined3d/surface.c
View file @
ea85a1ca
...
...
@@ -1909,28 +1909,6 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface)
return
pitch
;
}
HRESULT
CDECL
wined3d_surface_set_overlay_position
(
struct
wined3d_surface
*
surface
,
LONG
x
,
LONG
y
)
{
LONG
w
,
h
;
TRACE
(
"surface %p, x %d, y %d.
\n
"
,
surface
,
x
,
y
);
if
(
!
(
surface
->
resource
.
usage
&
WINED3DUSAGE_OVERLAY
))
{
WARN
(
"Not an overlay surface.
\n
"
);
return
WINEDDERR_NOTAOVERLAYSURFACE
;
}
w
=
surface
->
overlay_destrect
.
right
-
surface
->
overlay_destrect
.
left
;
h
=
surface
->
overlay_destrect
.
bottom
-
surface
->
overlay_destrect
.
top
;
surface
->
overlay_destrect
.
left
=
x
;
surface
->
overlay_destrect
.
top
=
y
;
surface
->
overlay_destrect
.
right
=
x
+
w
;
surface
->
overlay_destrect
.
bottom
=
y
+
h
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_surface_update_overlay_z_order
(
struct
wined3d_surface
*
surface
,
DWORD
flags
,
struct
wined3d_surface
*
ref
)
{
...
...
dlls/wined3d/texture.c
View file @
ea85a1ca
...
...
@@ -1376,6 +1376,33 @@ HRESULT CDECL wined3d_texture_get_overlay_position(const struct wined3d_texture
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_texture_set_overlay_position
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
LONG
x
,
LONG
y
)
{
struct
wined3d_resource
*
sub_resource
;
struct
wined3d_surface
*
surface
;
LONG
w
,
h
;
TRACE
(
"texture %p, sub_resource_idx %u, x %d, y %d.
\n
"
,
texture
,
sub_resource_idx
,
x
,
y
);
if
(
!
(
texture
->
resource
.
usage
&
WINED3DUSAGE_OVERLAY
)
||
texture
->
resource
.
type
!=
WINED3D_RTYPE_TEXTURE_2D
||
!
(
sub_resource
=
wined3d_texture_get_sub_resource
(
texture
,
sub_resource_idx
)))
{
WARN
(
"Invalid sub-resource specified.
\n
"
);
return
WINEDDERR_NOTAOVERLAYSURFACE
;
}
surface
=
surface_from_resource
(
sub_resource
);
w
=
surface
->
overlay_destrect
.
right
-
surface
->
overlay_destrect
.
left
;
h
=
surface
->
overlay_destrect
.
bottom
-
surface
->
overlay_destrect
.
top
;
surface
->
overlay_destrect
.
left
=
x
;
surface
->
overlay_destrect
.
top
=
y
;
surface
->
overlay_destrect
.
right
=
x
+
w
;
surface
->
overlay_destrect
.
bottom
=
y
+
h
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_texture_create
(
struct
wined3d_device
*
device
,
const
struct
wined3d_resource_desc
*
desc
,
UINT
level_count
,
DWORD
flags
,
const
struct
wined3d_sub_resource_data
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
...
...
dlls/wined3d/wined3d.spec
View file @
ea85a1ca
...
...
@@ -224,7 +224,6 @@
@ cdecl wined3d_surface_get_parent(ptr)
@ cdecl wined3d_surface_get_pitch(ptr)
@ cdecl wined3d_surface_set_overlay_position(ptr long long)
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr)
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
...
...
@@ -264,6 +263,7 @@
@ cdecl wined3d_texture_set_autogen_filter_type(ptr long)
@ cdecl wined3d_texture_set_color_key(ptr long ptr)
@ cdecl wined3d_texture_set_lod(ptr long)
@ cdecl wined3d_texture_set_overlay_position(ptr long long long)
@ cdecl wined3d_texture_update_desc(ptr long long long long long ptr long)
@ cdecl wined3d_vertex_declaration_create(ptr ptr long ptr ptr ptr)
...
...
include/wine/wined3d.h
View file @
ea85a1ca
...
...
@@ -2476,7 +2476,6 @@ ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
void
*
__cdecl
wined3d_surface_get_parent
(
const
struct
wined3d_surface
*
surface
);
DWORD
__cdecl
wined3d_surface_get_pitch
(
const
struct
wined3d_surface
*
surface
);
HRESULT
__cdecl
wined3d_surface_set_overlay_position
(
struct
wined3d_surface
*
surface
,
LONG
x
,
LONG
y
);
HRESULT
__cdecl
wined3d_surface_update_overlay
(
struct
wined3d_surface
*
surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
DWORD
flags
,
const
WINEDDOVERLAYFX
*
fx
);
HRESULT
__cdecl
wined3d_surface_update_overlay_z_order
(
struct
wined3d_surface
*
surface
,
...
...
@@ -2533,12 +2532,14 @@ struct wined3d_resource * __cdecl wined3d_texture_get_sub_resource(const struct
UINT
sub_resource_idx
);
ULONG
__cdecl
wined3d_texture_incref
(
struct
wined3d_texture
*
texture
);
void
__cdecl
wined3d_texture_preload
(
struct
wined3d_texture
*
texture
);
HRESULT
__cdecl
wined3d_texture_release_dc
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
HDC
dc
);
HRESULT
__cdecl
wined3d_texture_set_autogen_filter_type
(
struct
wined3d_texture
*
texture
,
enum
wined3d_texture_filter_type
filter_type
);
HRESULT
__cdecl
wined3d_texture_set_color_key
(
struct
wined3d_texture
*
texture
,
DWORD
flags
,
const
struct
wined3d_color_key
*
color_key
);
DWORD
__cdecl
wined3d_texture_set_lod
(
struct
wined3d_texture
*
texture
,
DWORD
lod
);
HRESULT
__cdecl
wined3d_texture_release_dc
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
HDC
dc
);
HRESULT
__cdecl
wined3d_texture_set_overlay_position
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
LONG
x
,
LONG
y
);
HRESULT
__cdecl
wined3d_texture_update_desc
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
...
...
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