From 2f0f5115886eae2847617a1091a46a832167f040 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 21 Mar 2021 21:03:42 +0100 Subject: [PATCH] Revert "gtk3: call ui::process() after gtk_gl_area_queue_render()" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit 95333c891fb8e1ce33241c51ed762a4a9e1f5893. The default value for gtk_gl_area_set_auto_render is true… So removing the call setting it to true has no effect. The ui::process() call was reported to improve performance when using a multi-window layout and GL texture binds fail because of no sharing mechanism accross GL contexts. So it's just dark magic and we may better fix that sharing thing first. --- libs/gtkutil/glwidget.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/gtkutil/glwidget.cpp b/libs/gtkutil/glwidget.cpp index dc3e624a..f463b8b3 100644 --- a/libs/gtkutil/glwidget.cpp +++ b/libs/gtkutil/glwidget.cpp @@ -80,6 +80,7 @@ ui::GLArea glwidget_new(bool zbuffer) { auto self = ui::GLArea::from(GTK_GL_AREA(gtk_gl_area_new())); gtk_gl_area_set_has_depth_buffer(self, zbuffer); + gtk_gl_area_set_auto_render(self, true); // FIXME self.connect("realize", G_CALLBACK(glwidget_context_created), nullptr); return self; @@ -99,9 +100,6 @@ void glwidget_swap_buffers(ui::GLArea self) { g_assert(GTK_IS_GL_AREA(self)); gtk_gl_area_queue_render(self); - - // Process the redraw, why is it needed? - ui::process(); } #endif -- 2.39.2