Bug 735600 - Don't composite when the layer tree is empty. r=bgirard
authorAli Juma <ajuma@mozilla.com>
Wed, 14 Mar 2012 10:54:34 -0400
changeset 89355 8017faf1070605a14e38dacd1ef14ab030381b1d
parent 89354 177a960d55959d6244cfb65fc650b6455dc5c455
child 89356 936ef50fa498d4185a15d7b75324daf1d4fa35c9
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgirard
bugs735600
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 735600 - Don't composite when the layer tree is empty. r=bgirard
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -180,17 +180,17 @@ void
 CompositorParent::Composite()
 {
   NS_ABORT_IF_FALSE(mCompositorThread->thread_id() == PlatformThread::CurrentId(),
                     "Composite can only be called on the compositor thread");
   mCurrentCompositeTask = NULL;
 
   mLastCompose = mozilla::TimeStamp::Now();
 
-  if (mPaused || !mLayerManager) {
+  if (mPaused || !mLayerManager || !mLayerManager->GetRoot()) {
     return;
   }
 
 #ifdef MOZ_WIDGET_ANDROID
   TransformShadowTree();
 #endif
 
   Layer* aLayer = mLayerManager->GetRoot();