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
d30da7ae
Commit
d30da7ae
authored
Apr 13, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the IWineD3DSwapChain typedefs.
parent
3ec19590
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
97 additions
and
90 deletions
+97
-90
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
context.c
dlls/wined3d/context.c
+3
-3
device.c
dlls/wined3d/device.c
+61
-52
stateblock.c
dlls/wined3d/stateblock.c
+3
-3
surface.c
dlls/wined3d/surface.c
+7
-7
surface_gdi.c
dlls/wined3d/surface_gdi.c
+4
-4
swapchain.c
dlls/wined3d/swapchain.c
+13
-13
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-7
No files found.
dlls/wined3d/arb_program_shader.c
View file @
d30da7ae
...
...
@@ -7206,7 +7206,7 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect_in
,
enum
wined3d_blit_op
blit_op
,
DWORD
Filter
)
{
IWineD3DSwapChainImpl
*
dst_swapchain
;
struct
wined3d_swapchain
*
dst_swapchain
;
struct
wined3d_context
*
context
;
RECT
dst_rect
=
*
dst_rect_in
;
...
...
dlls/wined3d/context.c
View file @
d30da7ae
...
...
@@ -1268,7 +1268,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
}
/* Do not call while under the GL lock. */
struct
wined3d_context
*
context_create
(
IWineD3DSwapChainImpl
*
swapchain
,
struct
wined3d_context
*
context_create
(
struct
wined3d_swapchain
*
swapchain
,
IWineD3DSurfaceImpl
*
target
,
const
struct
wined3d_format
*
ds_format
)
{
IWineD3DDeviceImpl
*
device
=
swapchain
->
device
;
...
...
@@ -1875,7 +1875,7 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur
}
else
{
IWineD3DSwapChainImpl
*
swapchain
=
This
->
swapchains
[
0
];
struct
wined3d_swapchain
*
swapchain
=
This
->
swapchains
[
0
];
if
(
swapchain
->
back_buffers
)
target
=
swapchain
->
back_buffers
[
0
];
else
target
=
swapchain
->
front_buffer
;
}
...
...
@@ -2006,7 +2006,7 @@ static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device,
struct
wined3d_context
*
context
,
IWineD3DSurfaceImpl
*
depth_stencil
)
{
/* Onscreen surfaces are always in a swapchain */
IWineD3DSwapChainImpl
*
swapchain
=
context
->
current_rt
->
container
.
u
.
swapchain
;
struct
wined3d_swapchain
*
swapchain
=
context
->
current_rt
->
container
.
u
.
swapchain
;
if
(
context
->
render_offscreen
||
!
depth_stencil
)
return
;
if
(
match_depth_stencil_format
(
swapchain
->
ds_format
,
depth_stencil
->
resource
.
format
))
return
;
...
...
dlls/wined3d/device.c
View file @
d30da7ae
This diff is collapsed.
Click to expand it.
dlls/wined3d/stateblock.c
View file @
d30da7ae
...
...
@@ -1079,7 +1079,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
DWORD
d
;
}
tmpfloat
;
unsigned
int
i
;
IWineD3DSwapC
hain
*
swapchain
;
struct
wined3d_swapc
hain
*
swapchain
;
IWineD3DSurface
*
backbuffer
;
HRESULT
hr
;
...
...
@@ -1305,8 +1305,8 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
/* Set the default viewport */
state
->
viewport
.
X
=
0
;
state
->
viewport
.
Y
=
0
;
state
->
viewport
.
Width
=
((
IWineD3DSwapChainImpl
*
)
swapchain
)
->
presentParms
.
BackBufferWidth
;
state
->
viewport
.
Height
=
((
IWineD3DSwapChainImpl
*
)
swapchain
)
->
presentParms
.
BackBufferHeight
;
state
->
viewport
.
Width
=
swapchain
->
presentParms
.
BackBufferWidth
;
state
->
viewport
.
Height
=
swapchain
->
presentParms
.
BackBufferHeight
;
state
->
viewport
.
MinZ
=
0
.
0
f
;
state
->
viewport
.
MaxZ
=
1
.
0
f
;
...
...
dlls/wined3d/surface.c
View file @
d30da7ae
...
...
@@ -1169,7 +1169,7 @@ void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface, IWineD3DS
GLenum
surface_get_gl_buffer
(
IWineD3DSurfaceImpl
*
surface
)
{
IWineD3DSwapChainImpl
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
struct
wined3d_swapchain
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
TRACE
(
"surface %p.
\n
"
,
surface
);
...
...
@@ -2260,7 +2260,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
pal
=
This
->
palette
->
palents
;
}
else
{
IWineD3DSurfaceImpl
*
dds_primary
;
IWineD3DSwapChainImpl
*
swapchain
;
struct
wined3d_swapchain
*
swapchain
;
swapchain
=
This
->
resource
.
device
->
swapchains
[
0
];
dds_primary
=
swapchain
->
front_buffer
;
if
(
dds_primary
&&
dds_primary
->
palette
)
...
...
@@ -2847,7 +2847,7 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) {
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_Flip
(
IWineD3DSurface
*
iface
,
IWineD3DSurface
*
override
,
DWORD
flags
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DSwapChainImpl
*
swapchain
=
NULL
;
struct
wined3d_swapchain
*
swapchain
=
NULL
;
TRACE
(
"iface %p, override %p, flags %#x.
\n
"
,
iface
,
override
,
flags
);
...
...
@@ -3020,8 +3020,8 @@ static void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *dst_surface, IWine
const
RECT
*
src_rect
,
const
RECT
*
dst_rect_in
,
WINED3DTEXTUREFILTERTYPE
Filter
)
{
IWineD3DDeviceImpl
*
device
=
dst_surface
->
resource
.
device
;
struct
wined3d_swapchain
*
src_swapchain
=
NULL
;
GLuint
src
,
backup
=
0
;
IWineD3DSwapChainImpl
*
src_swapchain
=
NULL
;
float
left
,
right
,
top
,
bottom
;
/* Texture coordinates */
UINT
fbwidth
=
src_surface
->
resource
.
width
;
UINT
fbheight
=
src_surface
->
resource
.
height
;
...
...
@@ -3568,7 +3568,7 @@ static void surface_blt_to_drawable(IWineD3DDeviceImpl *device,
IWineD3DSurfaceImpl
*
src_surface
,
const
RECT
*
src_rect_in
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect_in
)
{
IWineD3DSwapChainImpl
*
swapchain
=
NULL
;
struct
wined3d_swapchain
*
swapchain
=
NULL
;
struct
wined3d_context
*
context
;
RECT
src_rect
,
dst_rect
;
...
...
@@ -3660,7 +3660,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
{
IWineD3DDeviceImpl
*
device
=
dst_surface
->
resource
.
device
;
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
IWineD3DSwapChainImpl
*
srcSwapchain
=
NULL
,
*
dstSwapchain
=
NULL
;
struct
wined3d_swapchain
*
srcSwapchain
=
NULL
,
*
dstSwapchain
=
NULL
;
RECT
dst_rect
,
src_rect
;
TRACE
(
"dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.
\n
"
,
...
...
@@ -4918,7 +4918,7 @@ static WINED3DSURFTYPE WINAPI IWineD3DSurfaceImpl_GetImplType(IWineD3DSurface *i
BOOL
surface_is_offscreen
(
IWineD3DSurfaceImpl
*
surface
)
{
IWineD3DSwapChainImpl
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
struct
wined3d_swapchain
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
/* Not on a swapchain - must be offscreen */
if
(
surface
->
container
.
type
!=
WINED3D_CONTAINER_SWAPCHAIN
)
return
TRUE
;
...
...
dlls/wined3d/surface_gdi.c
View file @
d30da7ae
...
...
@@ -87,7 +87,7 @@ static void gdi_surface_realize_palette(IWineD3DSurfaceImpl *surface)
/* Tell the swapchain to update the screen. */
if
(
surface
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
{
IWineD3DSwapChainImpl
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
struct
wined3d_swapchain
*
swapchain
=
surface
->
container
.
u
.
swapchain
;
if
(
surface
==
swapchain
->
front_buffer
)
{
x11_copy_to_screen
(
swapchain
,
NULL
);
...
...
@@ -184,7 +184,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_Unmap(IWineD3DSurface *iface)
/* Tell the swapchain to update the screen */
if
(
This
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
{
IWineD3DSwapChainImpl
*
swapchain
=
This
->
container
.
u
.
swapchain
;
struct
wined3d_swapchain
*
swapchain
=
This
->
container
.
u
.
swapchain
;
if
(
This
==
swapchain
->
front_buffer
)
{
x11_copy_to_screen
(
swapchain
,
&
This
->
lockedRect
);
...
...
@@ -213,7 +213,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_Unmap(IWineD3DSurface *iface)
static
HRESULT
WINAPI
IWineGDISurfaceImpl_Flip
(
IWineD3DSurface
*
iface
,
IWineD3DSurface
*
override
,
DWORD
flags
)
{
IWineD3DSurfaceImpl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
iface
;
IWineD3DSwapChainImpl
*
swapchain
;
struct
wined3d_swapchain
*
swapchain
;
HRESULT
hr
;
if
(
surface
->
container
.
type
!=
WINED3D_CONTAINER_SWAPCHAIN
)
...
...
@@ -279,7 +279,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
pal
=
This
->
palette
->
palents
;
}
else
{
IWineD3DSurfaceImpl
*
dds_primary
;
IWineD3DSwapChainImpl
*
swapchain
;
struct
wined3d_swapchain
*
swapchain
;
swapchain
=
This
->
resource
.
device
->
swapchains
[
0
];
dds_primary
=
swapchain
->
front_buffer
;
if
(
dds_primary
&&
dds_primary
->
palette
)
...
...
dlls/wined3d/swapchain.c
View file @
d30da7ae
...
...
@@ -27,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL
(
fps
);
/* Do not call while under the GL lock. */
static
void
swapchain_cleanup
(
IWineD3DSwapChainImpl
*
swapchain
)
static
void
swapchain_cleanup
(
struct
wined3d_swapchain
*
swapchain
)
{
WINED3DDISPLAYMODE
mode
;
UINT
i
;
...
...
@@ -269,11 +269,11 @@ HRESULT CDECL wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *s
}
/* A GL context is provided by the caller */
static
void
swapchain_blit
(
IWineD3DSwapChainImpl
*
This
,
struct
wined3d_context
*
context
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
)
static
void
swapchain_blit
(
struct
wined3d_swapchain
*
swapchain
,
struct
wined3d_context
*
context
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
)
{
IWineD3D
DeviceImpl
*
device
=
This
->
device
;
IWineD3D
SurfaceImpl
*
backbuffer
=
This
->
back_buffers
[
0
]
;
IWineD3D
SurfaceImpl
*
backbuffer
=
swapchain
->
back_buffers
[
0
]
;
IWineD3D
DeviceImpl
*
device
=
swapchain
->
device
;
UINT
src_w
=
src_rect
->
right
-
src_rect
->
left
;
UINT
src_h
=
src_rect
->
bottom
-
src_rect
->
top
;
GLenum
gl_filter
;
...
...
@@ -282,14 +282,14 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
UINT
win_h
;
TRACE
(
"swapchain %p, context %p, src_rect %s, dst_rect %s.
\n
"
,
This
,
context
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
));
swapchain
,
context
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
));
if
(
src_w
==
dst_rect
->
right
-
dst_rect
->
left
&&
src_h
==
dst_rect
->
bottom
-
dst_rect
->
top
)
gl_filter
=
GL_NEAREST
;
else
gl_filter
=
GL_LINEAR
;
GetClientRect
(
This
->
win_handle
,
&
win_rect
);
GetClientRect
(
swapchain
->
win_handle
,
&
win_rect
);
win_h
=
win_rect
.
bottom
-
win_rect
.
top
;
if
(
gl_info
->
fbo_ops
.
glBlitFramebuffer
&&
is_identity_fixup
(
backbuffer
->
resource
.
format
->
color_fixup
))
...
...
@@ -309,7 +309,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_COLORWRITEENABLE3
));
glDisable
(
GL_SCISSOR_TEST
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
->
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_RENDER
(
WINED3DRS_SCISSORTESTENABLE
));
/* Note that the texture is upside down */
gl_info
->
fbo_ops
.
glBlitFramebuffer
(
src_rect
->
left
,
src_rect
->
top
,
src_rect
->
right
,
src_rect
->
bottom
,
...
...
@@ -326,7 +326,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
float
tex_right
=
src_rect
->
right
;
float
tex_bottom
=
src_rect
->
bottom
;
context2
=
context_acquire
(
This
->
device
,
This
->
back_buffers
[
0
]);
context2
=
context_acquire
(
device
,
swapchain
->
back_buffers
[
0
]);
context_apply_blit_state
(
context2
,
device
);
if
(
backbuffer
->
flags
&
SFLAG_NORMCOORD
)
...
...
@@ -395,7 +395,7 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
}
}
static
HRESULT
swapchain_gl_present
(
IWineD3DSwapChainImpl
*
swapchain
,
const
RECT
*
src_rect_in
,
static
HRESULT
swapchain_gl_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_in
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
{
const
struct
wined3d_gl_info
*
gl_info
;
...
...
@@ -634,7 +634,7 @@ static const struct wined3d_swapchain_ops swapchain_gl_ops =
};
/* Helper function that blits the front buffer contents to the target window. */
void
x11_copy_to_screen
(
IWineD3DSwapChainImpl
*
swapchain
,
const
RECT
*
rect
)
void
x11_copy_to_screen
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
rect
)
{
IWineD3DSurfaceImpl
*
front
;
POINT
offset
=
{
0
,
0
};
...
...
@@ -710,7 +710,7 @@ void x11_copy_to_screen(IWineD3DSwapChainImpl *swapchain, const RECT *rect)
ReleaseDC
(
window
,
dst_dc
);
}
static
HRESULT
swapchain_gdi_present
(
IWineD3DSwapChainImpl
*
swapchain
,
const
RECT
*
src_rect_in
,
static
HRESULT
swapchain_gdi_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_in
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
{
IWineD3DSurfaceImpl
*
front
,
*
back
;
...
...
@@ -794,7 +794,7 @@ static const struct wined3d_swapchain_ops swapchain_gdi_ops =
};
/* Do not call while under the GL lock. */
HRESULT
swapchain_init
(
IWineD3DSwapChainImpl
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
HRESULT
swapchain_init
(
struct
wined3d_swapchain
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
d30da7ae
...
...
@@ -54,8 +54,6 @@
typedef
struct
IWineD3DSurfaceImpl
IWineD3DSurfaceImpl
;
typedef
struct
IWineD3DDeviceImpl
IWineD3DDeviceImpl
;
typedef
struct
wined3d_swapchain
IWineD3DSwapChainImpl
;
typedef
struct
wined3d_swapchain
IWineD3DSwapChain
;
/* Texture format fixups */
...
...
@@ -1050,7 +1048,7 @@ struct wined3d_context
DWORD
numDirtyEntries
;
DWORD
isStateDirty
[
STATE_HIGHEST
/
(
sizeof
(
DWORD
)
*
CHAR_BIT
)
+
1
];
/* Bitmap to find out quickly if a state is dirty */
IWineD3DSwapChainImpl
*
swapchain
;
struct
wined3d_swapchain
*
swapchain
;
IWineD3DSurfaceImpl
*
current_rt
;
DWORD
tid
;
/* Thread ID which owns this context at the moment */
...
...
@@ -1220,7 +1218,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context *context,
GLenum
fbo_target
,
IWineD3DSurfaceImpl
*
depth_stencil
,
BOOL
use_render_buffer
)
DECLSPEC_HIDDEN
;
void
context_bind_fbo
(
struct
wined3d_context
*
context
,
GLenum
target
,
GLuint
*
fbo
)
DECLSPEC_HIDDEN
;
void
context_check_fbo_status
(
struct
wined3d_context
*
context
,
GLenum
target
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_create
(
IWineD3DSwapChainImpl
*
swapchain
,
IWineD3DSurfaceImpl
*
target
,
struct
wined3d_context
*
context_create
(
struct
wined3d_swapchain
*
swapchain
,
IWineD3DSurfaceImpl
*
target
,
const
struct
wined3d_format
*
ds_format
)
DECLSPEC_HIDDEN
;
void
context_destroy
(
IWineD3DDeviceImpl
*
This
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
void
context_free_event_query
(
struct
wined3d_event_query
*
query
)
DECLSPEC_HIDDEN
;
...
...
@@ -1709,7 +1707,7 @@ struct IWineD3DDeviceImpl
WINED3DDEVTYPE
devType
;
HWND
focus_window
;
IWineD3DSwapChainImpl
**
swapchains
;
struct
wined3d_swapchain
**
swapchains
;
UINT
swapchain_count
;
struct
list
resources
;
/* a linked list to track resources created by the device */
...
...
@@ -2551,10 +2549,10 @@ struct wined3d_swapchain
HWND
device_window
;
};
void
x11_copy_to_screen
(
IWineD3DSwapChainImpl
*
This
,
const
RECT
*
rc
)
DECLSPEC_HIDDEN
;
void
x11_copy_to_screen
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
swapchain_get_context
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
HRESULT
swapchain_init
(
IWineD3DSwapChainImpl
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
HRESULT
swapchain_init
(
struct
wined3d_swapchain
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
...
...
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