From da7712bc805c32a3fa35d38e9f22bea0027f6b7f Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Mon, 29 Jun 2026 06:52:35 +0200 Subject: [PATCH] no thumbnail capture when other route on top --- .../widgets/browser_modules/browser_view.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/weblibre/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/browser_view.dart b/apps/weblibre/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/browser_view.dart index 40ab84a1..ad026684 100644 --- a/apps/weblibre/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/browser_view.dart +++ b/apps/weblibre/lib/features/geckoview/features/browser/presentation/widgets/browser_modules/browser_view.dart @@ -109,6 +109,17 @@ class _BrowserViewState extends ConsumerState Offset _accumulatedDelta = Offset.zero; Future _timerTick(Timer timer) async { + // Skip the (expensive) Gecko render-to-bitmap while a full-cover route + // (settings, tab tray, search, …) occludes the browser. The screenshot + // would force an off-screen render the user can't see and competes for the + // GPU with the overlay's transition animation. The timer is kept alive so + // capture resumes automatically once the browser is foregrounded again. + // See https://github.com/FaFre/WebLibre/issues/492. + final topRoute = ref.read(currentTopRouteProvider); + if (topRoute is! GoRoute || topRoute.name != BrowserRoute.name) { + return; + } + await ref .read(selectedTabSessionProvider) .requestScreenshot(requireImageResult: false)