gl: Update tracked buffers from 2 to 4
authorBenjamin Otte <otte@redhat.com>
Wed, 24 May 2023 19:41:47 +0000 (21:41 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 24 May 2023 19:44:43 +0000 (21:44 +0200)
With XWayland and direct scanout it is possible that some apps get into
a situation where more than 2 buffers are in flight and in that case we
want to be able to still track the change regions for those buffers.

Usually 3 buffers are in use, so we go one higher, just to be safe.

gdk/gdkglcontextprivate.h

index cd28d48a7a9c6a283b9e3bedae8ea82245c21b58..9ce133c4b761b31fa036719397b4e7ca251acd6e 100644 (file)
@@ -37,7 +37,7 @@ typedef enum {
 /* The maximum amount of buffers we track update regions for.
  * Note that this is equal to the max buffer age value we
  * can provide a damage region for */
-#define GDK_GL_MAX_TRACKED_BUFFERS 2
+#define GDK_GL_MAX_TRACKED_BUFFERS 4
 
 #define GDK_GL_CONTEXT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GL_CONTEXT, GdkGLContextClass))
 #define GDK_IS_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GL_CONTEXT))