From dd1903f6dd47fdf636d74fbef421bbc905fc333f Mon Sep 17 00:00:00 2001 From: George Wright Date: Tue, 17 Apr 2012 13:56:25 -0400 Subject: [PATCH] Bug 728724 - Backout c210ff20f371, as the correct fix has now landed. r=joe a=blocking-fennec --- gfx/layers/ipc/CompositorParent.cpp | 49 ++++++++++------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 62028786ed6..953103262c2 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -231,23 +231,6 @@ CompositorParent::Composite() #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. @@ -256,21 +239,6 @@ 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 queue; queue.AppendElement(root); while (queue.Length()) { @@ -296,6 +264,23 @@ CompositorParent::GetPrimaryScrollableLayer() } #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() {