From f619a4b85ec3d052a9845cce25e272288618ca13 Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 21 Oct 2016 20:50:18 +0000 Subject: [PATCH] GTK: add a no-op glXSwapBuffers call for apitrace. Apitrace uses swapping buffers to determine frame boundaries; before this commit, everything solvespace renders gets put into a single frame. Since we don't use double-buffered rendering, the call does nothing (and is legal to perform), but apitrace output becomes readable. --- .gitignore | 2 +- src/platform/gtkmain.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dd7a50b8..4f301d00 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ /build*/ /test/**/*.diff.* /test/**/*.curr.* -*.trace # OpenGL apitrace files +*.trace /debian/tmp/ /debian/*.log /debian/*.substvars diff --git a/src/platform/gtkmain.cpp b/src/platform/gtkmain.cpp index 1560e28a..7cada7e4 100644 --- a/src/platform/gtkmain.cpp +++ b/src/platform/gtkmain.cpp @@ -324,6 +324,8 @@ protected: cr->paint(); surface->finish(); + glXSwapBuffers(_xdisplay, _xwindow); + return true; }