[gtk/matthiasc/color-profiles: 130/140] wayland: Implement can_hdr
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/color-profiles: 130/140] wayland: Implement can_hdr
- Date: Sun, 3 Oct 2021 04:45:13 +0000 (UTC)
commit 222f7032bd3eda0896bdd96458ad7e287bec4f8c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 1 20:35:27 2021 -0400
wayland: Implement can_hdr
Check that we have and hdr config. Easy.
gdk/wayland/gdkglcontext-wayland.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index 1a26a21ae1..8e5b5e8b3e 100644
--- a/gdk/wayland/gdkglcontext-wayland.c
+++ b/gdk/wayland/gdkglcontext-wayland.c
@@ -347,6 +347,16 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
gdk_wayland_surface_notify_committed (surface);
}
+static gboolean
+gdk_wayland_gl_context_can_hdr (GdkGLContext *context)
+{
+ GdkSurface *surface = gdk_gl_context_get_surface (context);
+ GdkDisplay *display = gdk_surface_get_display (surface);
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
+
+ return display_wayland->egl_config_hdr != 0;
+}
+
static void
gdk_wayland_gl_context_class_init (GdkWaylandGLContextClass *klass)
{
@@ -363,6 +373,7 @@ gdk_wayland_gl_context_class_init (GdkWaylandGLContextClass *klass)
context_class->make_current = gdk_wayland_gl_context_make_current;
context_class->clear_current = gdk_wayland_gl_context_clear_current;
context_class->get_damage = gdk_wayland_gl_context_get_damage;
+ context_class->can_hdr = gdk_wayland_gl_context_can_hdr;
context_class->backend_type = GDK_GL_EGL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]