[gtk/wip/matthiasc/gsk-hdr: 6/6] ngl: Update hdr for each frame




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

    ngl: Update hdr for each frame
    
    Look at whether the render nodes we are given
    require HDR and if so, request an HDR 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..9a34fc7bba 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_is_hdr (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]