From 45aa963d6b634f8d3e4e9a9ecdd272bf8ad751dd Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Sat, 5 Sep 2026 06:27:26 +0800 Subject: [PATCH] opengl: delay opengl flush See https://github.com/ghostty-org/ghostty/pull/14052#issuecomment-5521325497 --- src/renderer/opengl/Frame.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/opengl/Frame.zig b/src/renderer/opengl/Frame.zig index 4128887e9..d7a3f3e44 100644 --- a/src/renderer/opengl/Frame.zig +++ b/src/renderer/opengl/Frame.zig @@ -56,7 +56,6 @@ pub inline fn renderPass( /// pushing the newly presented and exported frame to the frame queue. pub fn complete(self: *const Self, sync: bool) void { _ = sync; - gl.finish(); // If there are any GL errors, consider the frame unhealthy. const health: Health = if (gl.errors.getError()) .healthy else |_| .unhealthy; @@ -74,6 +73,7 @@ pub fn complete(self: *const Self, sync: bool) void { // Notify the surface that it should redraw _ = self.renderer.surface_mailbox.push(.redraw, .{ .forever = {} }); } + gl.finish(); // Report the health to the renderer. self.renderer.frameCompleted(health);