зеркало из https://github.com/mozilla/gecko-dev.git
Bug 728284 - Main container layer has siblings that are drawn in the background. r=bgirard
This commit is contained in:
Родитель
160e1c0fcc
Коммит
fa77ed1232
|
@ -221,6 +221,23 @@ 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.
|
||||
|
@ -229,6 +246,21 @@ 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()) {
|
||||
|
@ -254,23 +286,6 @@ 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()
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче