summaryrefslogtreecommitdiffstats
path: root/gfx/layers/ipc/CompositorManagerChild.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/ipc/CompositorManagerChild.cpp')
-rw-r--r--gfx/layers/ipc/CompositorManagerChild.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/gfx/layers/ipc/CompositorManagerChild.cpp b/gfx/layers/ipc/CompositorManagerChild.cpp
index 0e553745d3..8d89339373 100644
--- a/gfx/layers/ipc/CompositorManagerChild.cpp
+++ b/gfx/layers/ipc/CompositorManagerChild.cpp
@@ -10,6 +10,7 @@
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/CompositorManagerParent.h"
#include "mozilla/layers/CompositorThread.h"
+#include "mozilla/gfx/CanvasShutdownManager.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/gfx/GPUProcessManager.h"
#include "mozilla/dom/ContentChild.h" // for ContentChild
@@ -67,7 +68,15 @@ bool CompositorManagerChild::Init(Endpoint<PCompositorManagerChild>&& aEndpoint,
sInstance = new CompositorManagerChild(std::move(aEndpoint), aProcessToken,
aNamespace);
sOtherPid = sInstance->OtherPid();
- return sInstance->CanSend();
+ if (!sInstance->CanSend()) {
+ return false;
+ }
+
+ // If there are any canvases waiting on the recreation of the GPUProcess or
+ // CompositorManagerChild, then we need to notify them so that they can
+ // restore their contexts.
+ gfx::CanvasShutdownManager::OnCompositorManagerRestored();
+ return true;
}
/* static */