commit a7968b10d6ab9a6b6f482be44dd1c58a7a2a2f37
parent f1a873656d29aca8117f255b477517e2c120f4a3
Author: Cristina Horotan <chorotan@mozilla.com>
Date: Thu, 9 Oct 2025 03:16:05 +0300
Revert "Bug 1993383 - Trigger a repaint of the window in the parent process after a GPU process crash. r=bradwerth" for causing build bustages at nsCocoaWindow.mm
This reverts commit 91b75d161ff7c2a7de6d2cc01cefdbc269e8fd01.
Diffstat:
2 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h
@@ -391,9 +391,13 @@ class nsCocoaWindow final : public nsBaseWidget {
bool WidgetPaintsBackground() override { return true; }
void CreateCompositor(int aWidth, int aHeight) override;
+ static void FinishCreateCompositor(
+ int aWidth, int aHeight,
+ mozilla::ipc::Endpoint<mozilla::layers::PNativeLayerRemoteParent>&&
+ aParentEndpoint,
+ RefPtr<mozilla::layers::NativeLayerRootRemoteMacParent>
+ aNativeLayerRootRemoteMacParent);
void DestroyCompositor() override;
- void NotifyCompositorSessionLost(
- mozilla::layers::CompositorSession* aSession) override;
void SetCompositorWidgetDelegate(
mozilla::widget::CompositorWidgetDelegate*) override;
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
@@ -974,30 +974,6 @@ void nsCocoaWindow::DestroyCompositor() {
nsBaseWidget::DestroyCompositor();
}
-void nsCocoaWindow::NotifyCompositorSessionLost(
- mozilla::layers::CompositorSession* aSession) {
- // The GPU process has crashed.
- //
- // Trigger a repaint of this window.
- // Without this, WebRender won't receive a display list for this
- // window until something else triggers a parent-side repaint. So tab
- // contents would remain frozen until the user moves the mouse over a
- // UI element, for example.
- //
- // The Windows equivalent to this code is InvalidateWindowForDeviceReset.
- //
- // We wait for a short time before the repaint in order to avoid
- // flashing tab content - if we were to trigger the parent-side paint
- // immediately, the composite would briefly hide the tab contents because
- // the new compositor won't have a display list for the tab yet.
- const double kTriggerPaintDelayAfterGpuProcessCrash = 0.4; // 400ms
- [mChildView performSelector:@selector(markLayerForDisplay)
- withObject:nil
- afterDelay:kTriggerPaintDelayAfterGpuProcessCrash];
-
- nsBaseWidget::NotifyCompositorSessionLost(aSession);
-}
-
void nsCocoaWindow::SetCompositorWidgetDelegate(
mozilla::widget::CompositorWidgetDelegate* aDelegate) {
if (aDelegate) {