Commit f20e6e9c authored by stransky's avatar stransky
Browse files

Bug 1865302 [Linux] Don't resume compositor if we're missing...

Bug 1865302 [Linux] Don't resume compositor if we're missing mCompositorWidgetDelegate. r=emilio, a=RyanVM

We pause compositor for scale changes to avoid flickering during repaint.
If compositor is deleted during the pause, don't try to resume it.
Just flip it back to enabled and let SetCompositorWidgetDelegate() or map event to resume it.

Differential Revision: https://phabricator.services.mozilla.com/D194110
parent e53eef6f
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -6576,6 +6576,14 @@ void nsWindow::ResumeCompositorFlickering() {


  MozClearHandleID(mCompositorPauseTimeoutID, g_source_remove);
  MozClearHandleID(mCompositorPauseTimeoutID, g_source_remove);


  // mCompositorWidgetDelegate can be deleted during timeout.
  // In such case just flip compositor back to enabled and let
  // SetCompositorWidgetDelegate() or Map event resume it.
  if (!mCompositorWidgetDelegate) {
    mCompositorState = COMPOSITOR_ENABLED;
    return;
  }

  ResumeCompositorImpl();
  ResumeCompositorImpl();
}
}