renderer/opengl: enable animations

This commit is contained in:
Mitchell Hashimoto
2023-11-17 20:48:20 -08:00
parent 5c7bad2f7d
commit 39e7055853

View File

@ -475,6 +475,13 @@ pub fn threadExit(self: *const OpenGL) void {
} }
} }
/// True if our renderer has animations so that a higher frequency
/// timer is used.
pub fn hasAnimations(self: *const OpenGL) bool {
const state = self.gl_state orelse return false;
return state.custom != null;
}
/// Callback when the focus changes for the terminal this is rendering. /// Callback when the focus changes for the terminal this is rendering.
/// ///
/// Must be called on the render thread. /// Must be called on the render thread.