From 850bdc592b000c8d88d9c55e4a3f8bb8b60c1966 Mon Sep 17 00:00:00 2001 From: Hariharan Mudaliar Date: Fri, 23 Jan 2026 12:37:17 +0530 Subject: [PATCH] Cap Liquid Glass Effect to 30FPS for reduced GPU throttling --- .../components/Extensions/ExtensionLockScreenWidgetView.swift | 2 +- .../components/LockScreen/LockScreenMusicPanel.swift | 4 ++-- .../components/LockScreen/LockScreenTimerWidget.swift | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DynamicIsland/components/Extensions/ExtensionLockScreenWidgetView.swift b/DynamicIsland/components/Extensions/ExtensionLockScreenWidgetView.swift index f6baa01..32863b4 100644 --- a/DynamicIsland/components/Extensions/ExtensionLockScreenWidgetView.swift +++ b/DynamicIsland/components/Extensions/ExtensionLockScreenWidgetView.swift @@ -114,7 +114,7 @@ struct ExtensionLockScreenWidgetView: View { @ViewBuilder private func liquidGlassBackground(shape: RoundedRectangle) -> some View { - TimelineView(.animation) { context in + TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in LiquidGlassBackground(variant: requestedLiquidGlassVariant, cornerRadius: descriptor.cornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) { Color.black.opacity(0.08) } diff --git a/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift b/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift index 8d74e46..590a212 100644 --- a/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift +++ b/DynamicIsland/components/LockScreen/LockScreenMusicPanel.swift @@ -781,7 +781,7 @@ struct LockScreenMusicPanel: View { @ViewBuilder private var customLiquidPanelBackdrop: some View { - TimelineView(.animation) { context in + TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in LiquidGlassBackground(variant: musicGlassVariant, cornerRadius: panelCornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) { Color.white.opacity(0.04) } @@ -862,7 +862,7 @@ struct LockScreenMusicPanel: View { @ViewBuilder private func customLiquidAlbumArtBackground(cornerRadius: CGFloat) -> some View { - TimelineView(.animation) { context in + TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in LiquidGlassBackground(variant: musicGlassVariant, cornerRadius: cornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) { Color.clear } diff --git a/DynamicIsland/components/LockScreen/LockScreenTimerWidget.swift b/DynamicIsland/components/LockScreen/LockScreenTimerWidget.swift index 2c0e6f7..f59c898 100644 --- a/DynamicIsland/components/LockScreen/LockScreenTimerWidget.swift +++ b/DynamicIsland/components/LockScreen/LockScreenTimerWidget.swift @@ -136,7 +136,7 @@ struct LockScreenTimerWidget: View { } private var customLiquidBackground: some View { - TimelineView(.animation) { context in + TimelineView(.periodic(from: .now, by: 1.0 / 30.0)) { context in LiquidGlassBackground(variant: timerGlassVariant, cornerRadius: Self.cornerRadius, trigger: context.date.timeIntervalSinceReferenceDate) { Color.black.opacity(0.12) }