diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index 8296176d4..4a1f0f131 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -509,19 +509,6 @@ pub fn setFocus(self: *Metal, focus: bool) !void { self.focused = focus; } -/// Callback when the view visibility changes, i.e. if a window is on -/// another workspace, behind a window, etc. -pub fn setVisible(self: *Metal, visible: bool) !void { - //if (true) return; - if (!visible) { - if (self.visible_resources) |*v| { - log.debug("view occluded, deallocating GPU resources", .{}); - v.deinit(self.alloc); - self.visible_resources = null; - } - } -} - /// Set the new font size. /// /// Must be called on the render thread. @@ -725,7 +712,6 @@ pub fn drawFrame(self: *Metal, surface: *apprt.Surface) !void { // Get our cached resources. If we don't have them, then we need to // create them. If we fail to create them, mark the renderer as unhealthy. const resources: *VisibleResources = if (self.visible_resources) |*v| v else resources: { - log.debug("view is visible, allocating GPU resources", .{}); const resources = VisibleResources.init(self) catch |err| { self.setHealth(.unhealthy); return err; @@ -2240,10 +2226,6 @@ const VisibleResources = struct { const texture_color = try initAtlasTexture(m.device, &m.font_group.atlas_color); errdefer deinitMTLResource(texture_color); - // Mark our atlas as modified so the textures are synced - m.font_group.atlas_greyscale.modified = true; - m.font_group.atlas_color.modified = true; - return .{ .shaders = shaders, .buf_cells = buf_cells, diff --git a/src/renderer/Thread.zig b/src/renderer/Thread.zig index 84f1940f5..113f6761c 100644 --- a/src/renderer/Thread.zig +++ b/src/renderer/Thread.zig @@ -250,9 +250,6 @@ fn drainMailbox(self: *Thread) !void { // Set our visible state self.flags.visible = v; - // Set it on the renderer - try self.renderer.setVisible(v); - // If we became visible then we immediately trigger a draw. // We don't need to update frame data because that should // still be happening.