[PATCH 1/5] wined3d: Move the swapchain logo texture blit to wined3d_cs_exec_present().
Henri Verbeet
hverbeet at codeweavers.com
Tue May 26 11:10:09 CDT 2020
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/cs.c | 11 +++++++++++
dlls/wined3d/swapchain.c | 11 +----------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 89e59b5373a..b5a34a6ab62 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -521,13 +521,24 @@ static void wined3d_cs_exec_nop(struct wined3d_cs *cs, const void *data)
static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data)
{
+ struct wined3d_texture *logo_texture, *back_buffer;
const struct wined3d_cs_present *op = data;
struct wined3d_swapchain *swapchain;
unsigned int i;
swapchain = op->swapchain;
+ back_buffer = swapchain->back_buffers[0];
wined3d_swapchain_set_window(swapchain, op->dst_window_override);
+ if ((logo_texture = swapchain->device->logo_texture))
+ {
+ RECT rect = {0, 0, logo_texture->resource.width, logo_texture->resource.height};
+
+ /* Blit the logo into the upper left corner of the back-buffer. */
+ wined3d_texture_blt(back_buffer, 0, &rect, logo_texture, 0,
+ &rect, WINED3D_BLT_SRC_CKEY, NULL, WINED3D_TEXF_POINT);
+ }
+
swapchain->swapchain_ops->swapchain_present(swapchain, &op->src_rect, &op->dst_rect, op->swap_interval, op->flags);
if (TRACE_ON(fps))
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 9020a995209..a48b98aac3f 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -469,7 +469,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
struct wined3d_texture *back_buffer = swapchain->back_buffers[0];
const struct wined3d_fb_state *fb = &swapchain->device->cs->state.fb;
struct wined3d_rendertarget_view *dsv = fb->depth_stencil;
- struct wined3d_texture *logo_texture, *cursor_texture;
+ struct wined3d_texture *cursor_texture;
const struct wined3d_gl_info *gl_info;
struct wined3d_context_gl *context_gl;
struct wined3d_context *context;
@@ -488,15 +488,6 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
swapchain_gl_set_swap_interval(swapchain, context_gl, swap_interval);
- if ((logo_texture = swapchain->device->logo_texture))
- {
- RECT rect = {0, 0, logo_texture->resource.width, logo_texture->resource.height};
-
- /* Blit the logo into the upper left corner of the drawable. */
- wined3d_texture_blt(back_buffer, 0, &rect, logo_texture, 0, &rect,
- WINED3D_BLT_SRC_CKEY, NULL, WINED3D_TEXF_POINT);
- }
-
if ((cursor_texture = swapchain->device->cursor_texture)
&& swapchain->device->bCursorVisible && !swapchain->device->hardwareCursor)
{
--
2.20.1
More information about the wine-devel
mailing list