Bug 728724 - Backout c210ff20f371, as the correct fix has now landed. r=joe a=blocking-fennec
authorGeorge Wright <gwright@mozilla.com>
Tue, 17 Apr 2012 13:56:25 -0400
changeset 91883 6b917c007510a7c4f7c75d542a9419bbf396c80a
parent 91882 ac561faaee40bd1c65e4b0dedd7522c2b10893a0
child 91884 93dfd98900ad8e01e64e0bafb8880209777c5811
child 91892 c80635a1c62f6bb7c6f555f5edb2282aa4a616a9
push id22480
push useremorley@mozilla.com
push dateWed, 18 Apr 2012 00:48:48 +0000
treeherdermozilla-central@93dfd98900ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe, blocking-fennec
bugs728724
milestone14.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 728724 - Backout c210ff20f371, as the correct fix has now landed. r=joe a=blocking-fennec
gfx/layers/ipc/CompositorParent.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -226,56 +226,24 @@ CompositorParent::Composite()
 #ifdef COMPOSITOR_PERFORMANCE_WARNING
   if (mExpectedComposeTime + TimeDuration::FromMilliseconds(15) < mozilla::TimeStamp::Now()) {
     printf_stderr("Compositor: Composite took %i ms.\n",
                   15 + (int)(mozilla::TimeStamp::Now() - mExpectedComposeTime).ToMilliseconds());
   }
 #endif
 }
 
-// Go down shadow layer tree, setting properties to match their non-shadow
-// counterparts.
-static void
-SetShadowProperties(Layer* aLayer)
-{
-  // FIXME: Bug 717688 -- Do these updates in ShadowLayersParent::RecvUpdate.
-  ShadowLayer* shadow = aLayer->AsShadowLayer();
-  shadow->SetShadowTransform(aLayer->GetTransform());
-  shadow->SetShadowVisibleRegion(aLayer->GetVisibleRegion());
-  shadow->SetShadowClipRect(aLayer->GetClipRect());
-
-  for (Layer* child = aLayer->GetFirstChild();
-      child; child = child->GetNextSibling()) {
-    SetShadowProperties(child);
-  }
-}
-
 #ifdef MOZ_WIDGET_ANDROID
 // Do a breadth-first search to find the first layer in the tree that is
 // scrollable.
 Layer*
 CompositorParent::GetPrimaryScrollableLayer()
 {
   Layer* root = mLayerManager->GetRoot();
 
-  // FIXME: We're currently getting passed layers that are not part of our content, but
-  // we are drawing them anyway. This is causing severe rendering corruption to our background
-  // and checkerboarding. The real fix here is to assert that we don't have any useless layers
-  // and ensure that layout isn't giving us any. This is being tracked in bug 728284.
-  // For now just clip them to the empty rect so we don't draw them.
-  Layer* discardLayer = root->GetFirstChild();
-
-  while (discardLayer) {
-    if (!discardLayer->AsContainerLayer()) {
-      discardLayer->IntersectClipRect(nsIntRect());
-      SetShadowProperties(discardLayer);
-    }
-    discardLayer = discardLayer->GetNextSibling();
-  }
-
   nsTArray<Layer*> queue;
   queue.AppendElement(root);
   while (queue.Length()) {
     ContainerLayer* containerLayer = queue[0]->AsContainerLayer();
     queue.RemoveElementAt(0);
     if (!containerLayer) {
       continue;
     }
@@ -291,16 +259,33 @@ CompositorParent::GetPrimaryScrollableLa
       child = child->GetNextSibling();
     }
   }
 
   return root;
 }
 #endif
 
+// Go down shadow layer tree, setting properties to match their non-shadow
+// counterparts.
+static void
+SetShadowProperties(Layer* aLayer)
+{
+  // FIXME: Bug 717688 -- Do these updates in ShadowLayersParent::RecvUpdate.
+  ShadowLayer* shadow = aLayer->AsShadowLayer();
+  shadow->SetShadowTransform(aLayer->GetTransform());
+  shadow->SetShadowVisibleRegion(aLayer->GetVisibleRegion());
+  shadow->SetShadowClipRect(aLayer->GetClipRect());
+
+  for (Layer* child = aLayer->GetFirstChild();
+      child; child = child->GetNextSibling()) {
+    SetShadowProperties(child);
+  }
+}
+
 void
 CompositorParent::TransformShadowTree()
 {
 #ifdef MOZ_WIDGET_ANDROID
   Layer* layer = GetPrimaryScrollableLayer();
   ShadowLayer* shadow = layer->AsShadowLayer();
   ContainerLayer* container = layer->AsContainerLayer();