mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
renderer/metal: fix custom shader animations with display link
This commit is contained in:
@ -1039,10 +1039,11 @@ pub fn updateFrame(
|
|||||||
pub fn drawFrame(self: *Metal, surface: *apprt.Surface) !void {
|
pub fn drawFrame(self: *Metal, surface: *apprt.Surface) !void {
|
||||||
_ = surface;
|
_ = surface;
|
||||||
|
|
||||||
// If our cells are not rebuilt, do a no-op draw. This means
|
// If we have no cells rebuilt we can usually skip drawing since there
|
||||||
// that no possible new data can exist that would warrant a full
|
// is no changed data. However, if we have active animations we still
|
||||||
// GPU update, our existing drawable is valid.
|
// need to draw so that we can update the time uniform and render the
|
||||||
if (!self.cells_rebuilt) return;
|
// changes.
|
||||||
|
if (!self.cells_rebuilt and !self.hasAnimations()) return;
|
||||||
self.cells_rebuilt = false;
|
self.cells_rebuilt = false;
|
||||||
|
|
||||||
// Wait for a frame to be available.
|
// Wait for a frame to be available.
|
||||||
|
Reference in New Issue
Block a user