[gtk/matthiasc/color-profiles: 10/12] glcontext: Add api to query hdr support
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/color-profiles: 10/12] glcontext: Add api to query hdr support
- Date: Sat, 2 Oct 2021 00:41:07 +0000 (UTC)
commit 3236de2cc3b3b97324eff3d53b5db4107f083ed9
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 1 20:34:41 2021 -0400
glcontext: Add api to query hdr support
Add private api to find out if we have an fbconfig
for HDR framebuffers.
Currently this does nothing, since no backend implments
the vfunc yet.
gdk/gdkglcontext.c | 13 +++++++++++++
gdk/gdkglcontextprivate.h | 4 ++++
2 files changed, 17 insertions(+)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 975b4cf58a..9c4efa5090 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -303,6 +303,12 @@ gdk_gl_context_surface_resized (GdkDrawContext *draw_context)
gdk_gl_context_clear_old_updated_area (context);
}
+static gboolean
+gdk_gl_context_real_can_hdr (GdkGLContext *self)
+{
+ return FALSE;
+}
+
static void
gdk_gl_context_class_init (GdkGLContextClass *klass)
{
@@ -312,6 +318,7 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
klass->realize = gdk_gl_context_real_realize;
klass->get_damage = gdk_gl_context_real_get_damage;
klass->is_shared = gdk_gl_context_real_is_shared;
+ klass->can_hdr = gdk_gl_context_real_can_hdr;
draw_context_class->begin_frame = gdk_gl_context_real_begin_frame;
draw_context_class->end_frame = gdk_gl_context_real_end_frame;
@@ -1316,3 +1323,9 @@ gdk_gl_backend_use (GdkGLBackend backend_type)
g_assert (the_gl_backend_type == backend_type);
}
+
+gboolean
+gdk_gl_context_can_hdr (GdkGLContext *self)
+{
+ return GDK_GL_CONTEXT_GET_CLASS (self)->can_hdr (self);
+}
diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h
index e7733f52b1..d347910beb 100644
--- a/gdk/gdkglcontextprivate.h
+++ b/gdk/gdkglcontextprivate.h
@@ -72,6 +72,8 @@ struct _GdkGLContextClass
gboolean (* is_shared) (GdkGLContext *self,
GdkGLContext *other);
+
+ gboolean (* can_hdr) (GdkGLContext *self);
};
typedef struct {
@@ -131,6 +133,8 @@ gboolean gdk_gl_context_has_debug (GdkGLContext
gboolean gdk_gl_context_use_es_bgra (GdkGLContext *context);
+gboolean gdk_gl_context_can_hdr (GdkGLContext *context);
+
typedef struct {
float x1, y1, x2, y2;
float u1, v1, u2, v2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]