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
107c2608
Commit
107c2608
authored
Dec 25, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Make ddraw_surface_init() static.
parent
87cd1390
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
45 deletions
+43
-45
ddraw_private.h
dlls/ddraw/ddraw_private.h
+0
-2
surface.c
dlls/ddraw/surface.c
+43
-43
No files found.
dlls/ddraw/ddraw_private.h
View file @
107c2608
...
...
@@ -238,8 +238,6 @@ struct ddraw_texture
HRESULT
ddraw_surface_create
(
struct
ddraw
*
ddraw
,
const
DDSURFACEDESC2
*
surface_desc
,
struct
ddraw_surface
**
surface
,
IUnknown
*
outer_unknown
,
unsigned
int
version
)
DECLSPEC_HIDDEN
;
struct
wined3d_rendertarget_view
*
ddraw_surface_get_rendertarget_view
(
struct
ddraw_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
ddraw_surface_init
(
struct
ddraw_surface
*
surface
,
struct
ddraw
*
ddraw
,
struct
wined3d_texture
*
wined3d_texture
,
unsigned
int
sub_resource_idx
)
DECLSPEC_HIDDEN
;
HRESULT
ddraw_surface_update_frontbuffer
(
struct
ddraw_surface
*
surface
,
const
RECT
*
rect
,
BOOL
read
,
unsigned
int
swap_interval
)
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/surface.c
View file @
107c2608
...
...
@@ -5912,6 +5912,49 @@ static const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops =
ddraw_surface_wined3d_object_destroyed
,
};
static
void
ddraw_surface_init
(
struct
ddraw_surface
*
surface
,
struct
ddraw
*
ddraw
,
struct
wined3d_texture
*
wined3d_texture
,
unsigned
int
sub_resource_idx
)
{
struct
ddraw_texture
*
texture
=
wined3d_texture_get_parent
(
wined3d_texture
);
unsigned
int
version
=
texture
->
version
;
surface
->
IDirectDrawSurface7_iface
.
lpVtbl
=
&
ddraw_surface7_vtbl
;
surface
->
IDirectDrawSurface4_iface
.
lpVtbl
=
&
ddraw_surface4_vtbl
;
surface
->
IDirectDrawSurface3_iface
.
lpVtbl
=
&
ddraw_surface3_vtbl
;
surface
->
IDirectDrawSurface2_iface
.
lpVtbl
=
&
ddraw_surface2_vtbl
;
surface
->
IDirectDrawSurface_iface
.
lpVtbl
=
&
ddraw_surface1_vtbl
;
surface
->
IDirectDrawGammaControl_iface
.
lpVtbl
=
&
ddraw_gamma_control_vtbl
;
surface
->
IDirect3DTexture2_iface
.
lpVtbl
=
&
d3d_texture2_vtbl
;
surface
->
IDirect3DTexture_iface
.
lpVtbl
=
&
d3d_texture1_vtbl
;
surface
->
iface_count
=
1
;
surface
->
version
=
version
;
surface
->
ddraw
=
ddraw
;
if
(
version
==
7
)
{
surface
->
ref7
=
1
;
surface
->
texture_outer
=
(
IUnknown
*
)
&
surface
->
IDirectDrawSurface7_iface
;
}
else
if
(
version
==
4
)
{
surface
->
ref4
=
1
;
surface
->
texture_outer
=
(
IUnknown
*
)
&
surface
->
IDirectDrawSurface4_iface
;
}
else
{
surface
->
ref1
=
1
;
surface
->
texture_outer
=
(
IUnknown
*
)
&
surface
->
IDirectDrawSurface_iface
;
}
surface
->
first_attached
=
surface
;
wined3d_texture_incref
(
surface
->
wined3d_texture
=
wined3d_texture
);
surface
->
sub_resource_idx
=
sub_resource_idx
;
surface
->
texture_location
=
DDRAW_SURFACE_LOCATION_DEFAULT
;
wined3d_private_store_init
(
&
surface
->
private_store
);
}
static
void
STDMETHODCALLTYPE
ddraw_texture_wined3d_object_destroyed
(
void
*
parent
)
{
struct
ddraw_texture
*
texture
=
parent
;
...
...
@@ -6836,49 +6879,6 @@ fail:
return
hr
;
}
void
ddraw_surface_init
(
struct
ddraw_surface
*
surface
,
struct
ddraw
*
ddraw
,
struct
wined3d_texture
*
wined3d_texture
,
unsigned
int
sub_resource_idx
)
{
struct
ddraw_texture
*
texture
=
wined3d_texture_get_parent
(
wined3d_texture
);
unsigned
int
version
=
texture
->
version
;
surface
->
IDirectDrawSurface7_iface
.
lpVtbl
=
&
ddraw_surface7_vtbl
;
surface
->
IDirectDrawSurface4_iface
.
lpVtbl
=
&
ddraw_surface4_vtbl
;
surface
->
IDirectDrawSurface3_iface
.
lpVtbl
=
&
ddraw_surface3_vtbl
;
surface
->
IDirectDrawSurface2_iface
.
lpVtbl
=
&
ddraw_surface2_vtbl
;
surface
->
IDirectDrawSurface_iface
.
lpVtbl
=
&
ddraw_surface1_vtbl
;
surface
->
IDirectDrawGammaControl_iface
.
lpVtbl
=
&
ddraw_gamma_control_vtbl
;
surface
->
IDirect3DTexture2_iface
.
lpVtbl
=
&
d3d_texture2_vtbl
;
surface
->
IDirect3DTexture_iface
.
lpVtbl
=
&
d3d_texture1_vtbl
;
surface
->
iface_count
=
1
;
surface
->
version
=
version
;
surface
->
ddraw
=
ddraw
;
if
(
version
==
7
)
{
surface
->
ref7
=
1
;
surface
->
texture_outer
=
(
IUnknown
*
)
&
surface
->
IDirectDrawSurface7_iface
;
}
else
if
(
version
==
4
)
{
surface
->
ref4
=
1
;
surface
->
texture_outer
=
(
IUnknown
*
)
&
surface
->
IDirectDrawSurface4_iface
;
}
else
{
surface
->
ref1
=
1
;
surface
->
texture_outer
=
(
IUnknown
*
)
&
surface
->
IDirectDrawSurface_iface
;
}
surface
->
first_attached
=
surface
;
wined3d_texture_incref
(
surface
->
wined3d_texture
=
wined3d_texture
);
surface
->
sub_resource_idx
=
sub_resource_idx
;
surface
->
texture_location
=
DDRAW_SURFACE_LOCATION_DEFAULT
;
wined3d_private_store_init
(
&
surface
->
private_store
);
}
static
void
STDMETHODCALLTYPE
view_wined3d_object_destroyed
(
void
*
parent
)
{
struct
ddraw_surface
*
surface
=
parent
;
...
...
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