Backed out changeset c378df360469 (bug 947781)
authorEd Morley <emorley@mozilla.com>
Wed, 30 Jul 2014 14:54:04 +0100
changeset 196803 ba00ca45db46b010fe45247c35cc1efe26175f16
parent 196802 df0091e830dba934a130cd2b45736f6326f77b6c
child 196804 90d1352dbd19ac1b711988bd2c8efed2d125b231
push id46965
push useremorley@mozilla.com
push dateWed, 30 Jul 2014 13:54:43 +0000
treeherdermozilla-inbound@1528900bd8cf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs947781
milestone34.0a1
backs outc378df3604697cd38115698e128fd6dc3cef6359
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
Backed out changeset c378df360469 (bug 947781)
gfx/layers/ipc/ShadowLayers.cpp
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -248,60 +248,39 @@ ShadowLayerForwarder::SetRoot(Shadowable
 {
   mTxn->AddEdit(OpSetRoot(nullptr, Shadow(aRoot)));
 }
 void
 ShadowLayerForwarder::InsertAfter(ShadowableLayer* aContainer,
                                   ShadowableLayer* aChild,
                                   ShadowableLayer* aAfter)
 {
-  if (!aChild->HasShadow()) {
-    return;
-  }
-
-  while (aAfter && !aAfter->HasShadow()) {
-    aAfter = aAfter->AsLayer()->GetPrevSibling() ? aAfter->AsLayer()->GetPrevSibling()->AsShadowableLayer() : nullptr;
-  }
-
-  if (aAfter) {
+  if (aAfter)
     mTxn->AddEdit(OpInsertAfter(nullptr, Shadow(aContainer),
                                 nullptr, Shadow(aChild),
                                 nullptr, Shadow(aAfter)));
-  } else {
+  else
     mTxn->AddEdit(OpPrependChild(nullptr, Shadow(aContainer),
                                  nullptr, Shadow(aChild)));
-  }
 }
 void
 ShadowLayerForwarder::RemoveChild(ShadowableLayer* aContainer,
                                   ShadowableLayer* aChild)
 {
   MOZ_LAYERS_LOG(("[LayersForwarder] OpRemoveChild container=%p child=%p\n",
                   aContainer->AsLayer(), aChild->AsLayer()));
 
-  if (!aChild->HasShadow()) {
-    return;
-  }
-
   mTxn->AddEdit(OpRemoveChild(nullptr, Shadow(aContainer),
                               nullptr, Shadow(aChild)));
 }
 void
 ShadowLayerForwarder::RepositionChild(ShadowableLayer* aContainer,
                                       ShadowableLayer* aChild,
                                       ShadowableLayer* aAfter)
 {
-  if (!aChild->HasShadow()) {
-    return;
-  }
-
-  while (aAfter && !aAfter->HasShadow()) {
-    aAfter = aAfter->AsLayer()->GetPrevSibling() ? aAfter->AsLayer()->GetPrevSibling()->AsShadowableLayer() : nullptr;
-  }
-
   if (aAfter) {
     MOZ_LAYERS_LOG(("[LayersForwarder] OpRepositionChild container=%p child=%p after=%p",
                    aContainer->AsLayer(), aChild->AsLayer(), aAfter->AsLayer()));
     mTxn->AddEdit(OpRepositionChild(nullptr, Shadow(aContainer),
                                     nullptr, Shadow(aChild),
                                     nullptr, Shadow(aAfter)));
   } else {
     MOZ_LAYERS_LOG(("[LayersForwarder] OpRaiseToTopChild container=%p child=%p",
@@ -520,20 +499,16 @@ ShadowLayerForwarder::EndTransaction(Inf
   // We purposely add attribute-change ops to the final changeset
   // before we add paint ops.  This allows layers to record the
   // attribute changes before new pixels arrive, which can be useful
   // for setting up back/front buffers.
   RenderTraceScope rendertrace2("Foward Transaction", "000092");
   for (ShadowableLayerSet::const_iterator it = mTxn->mMutants.begin();
        it != mTxn->mMutants.end(); ++it) {
     ShadowableLayer* shadow = *it;
-
-    if (!shadow->HasShadow()) {
-      continue;
-    }
     Layer* mutant = shadow->AsLayer();
     NS_ABORT_IF_FALSE(!!mutant, "unshadowable layer?");
 
     LayerAttributes attrs;
     CommonLayerAttributes& common = attrs.common();
     common.visibleRegion() = mutant->GetVisibleRegion();
     common.eventRegions() = mutant->GetEventRegions();
     common.postXScale() = mutant->GetPostXScale();