[gtk/wip/matthiasc/gsk-hdr: 4/5] ngl: Update framebuffer format for each frame




commit 8a24deff97e2626beda86029b31d6340f613680f
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 1 16:47:55 2021 -0400

    ngl: Update framebuffer format for each frame
    
    Look at whether the render nodes are high depth and
    if so, request a high depth framebuffer.
    Whether we actually get one is up to the backend.

 gsk/ngl/gsknglrenderer.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderer.c b/gsk/ngl/gsknglrenderer.c
index 7263d0b1e4..e5aaebd0a4 100644
--- a/gsk/ngl/gsknglrenderer.c
+++ b/gsk/ngl/gsknglrenderer.c
@@ -22,8 +22,11 @@
 
 #include <gdk/gdkprofilerprivate.h>
 #include <gdk/gdkdisplayprivate.h>
+#include <gdk/gdkglcontextprivate.h>
+#include <gdk/gdksurfaceprivate.h>
 #include <gsk/gskdebugprivate.h>
 #include <gsk/gskrendererprivate.h>
+#include <gsk/gskrendernodeprivate.h>
 
 #include "gsknglcommandqueueprivate.h"
 #include "gskngldriverprivate.h"
@@ -201,7 +204,9 @@ gsk_ngl_renderer_render (GskRenderer          *renderer,
   viewport.size.height = gdk_surface_get_height (surface) * scale_factor;
 
   gdk_gl_context_make_current (self->context);
-  gdk_draw_context_begin_frame (GDK_DRAW_CONTEXT (self->context), update_area);
+  gdk_draw_context_begin_frame_full (GDK_DRAW_CONTEXT (self->context),
+                                     gsk_render_node_prefers_high_depth (root),
+                                     update_area);
 
   /* Must be called *AFTER* gdk_draw_context_begin_frame() */
   render_region = get_render_region (surface, self->context);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]