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
3ba95e2f
Commit
3ba95e2f
authored
Apr 15, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move the present() back buffer check to the common wined3d_swapchain_present() code.
parent
fa6a8396
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
swapchain.c
dlls/wined3d/swapchain.c
+12
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/swapchain.c
View file @
3ba95e2f
...
...
@@ -145,10 +145,17 @@ HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
swapchain
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
),
dst_window_override
,
dirty_region
,
flags
);
if
(
!
swapchain
->
back_buffers
)
{
WARN
(
"Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
wined3d_swapchain_set_window
(
swapchain
,
dst_window_override
);
return
swapchain
->
swapchain_ops
->
swapchain_present
(
swapchain
,
src_rect
,
dst_rect
,
dirty_region
,
flags
);
swapchain
->
swapchain_ops
->
swapchain_present
(
swapchain
,
src_rect
,
dst_rect
,
dirty_region
,
flags
);
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_swapchain_get_front_buffer_data
(
const
struct
wined3d_swapchain
*
swapchain
,
...
...
@@ -446,7 +453,7 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
}
}
static
HRESULT
swapchain_gl_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
static
void
swapchain_gl_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_in
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
{
struct
wined3d_surface
*
back_buffer
=
swapchain
->
back_buffers
[
0
];
...
...
@@ -461,7 +468,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
{
context_release
(
context
);
WARN
(
"Invalid context, skipping present.
\n
"
);
return
WINED3D_OK
;
return
;
}
gl_info
=
context
->
gl_info
;
...
...
@@ -685,9 +692,6 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
}
context_release
(
context
);
TRACE
(
"returning
\n
"
);
return
WINED3D_OK
;
}
static
const
struct
wined3d_swapchain_ops
swapchain_gl_ops
=
...
...
@@ -740,16 +744,11 @@ void x11_copy_to_screen(const struct wined3d_swapchain *swapchain, const RECT *r
ReleaseDC
(
window
,
dst_dc
);
}
static
HRESULT
swapchain_gdi_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
static
void
swapchain_gdi_present
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect_in
,
const
RECT
*
dst_rect_in
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
{
struct
wined3d_surface
*
front
,
*
back
;
if
(
!
swapchain
->
back_buffers
)
{
WARN
(
"Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
front
=
swapchain
->
front_buffer
;
back
=
swapchain
->
back_buffers
[
0
];
...
...
@@ -806,8 +805,6 @@ static HRESULT swapchain_gdi_present(struct wined3d_swapchain *swapchain, const
}
x11_copy_to_screen
(
swapchain
,
NULL
);
return
WINED3D_OK
;
}
static
const
struct
wined3d_swapchain_ops
swapchain_gdi_ops
=
...
...
dlls/wined3d/wined3d_private.h
View file @
3ba95e2f
...
...
@@ -2443,7 +2443,7 @@ struct wined3d_rendertarget_view
struct
wined3d_swapchain_ops
{
HRESULT
(
*
swapchain_present
)(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
void
(
*
swapchain_present
)(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
const
RGNDATA
*
dirty_region
,
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