Henri Verbeet : wined3d: Move the swapchain logo texture blit to wined3d_cs_exec_present().

Alexandre Julliard julliard at winehq.org
Tue May 26 17:17:07 CDT 2020


Module: wine
Branch: master
Commit: 4bae47cf17269479d70f4fe28e4c389fea0ee561
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4bae47cf17269479d70f4fe28e4c389fea0ee561

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue May 26 20:58:09 2020 +0430

wined3d: Move the swapchain logo texture blit to wined3d_cs_exec_present().

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 89e59b5373..b5a34a6ab6 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 9020a99520..a48b98aac3 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)
     {




More information about the wine-cvs mailing list