Bug 1248822 - In LayerManagerComposite::UpdateAndRender(), call PostProcessLayers() before LayerTreeInvalidation. r=mattwoodrow
The reason is that PostProcessLayers() can change the effective visible region,
and LayerTreeInvalidation needs the final effective visible region.
MozReview-Commit-ID: 1wLROyOTcIB
--- a/gfx/layers/composite/LayerManagerComposite.cpp
+++ b/gfx/layers/composite/LayerManagerComposite.cpp
@@ -380,16 +380,20 @@ LayerManagerComposite::EndTransaction(co
}
void
LayerManagerComposite::UpdateAndRender()
{
nsIntRegion invalid;
bool didEffectiveTransforms = false;
+ nsIntRegion opaque;
+ LayerIntRegion visible;
+ PostProcessLayers(mRoot, opaque, visible, Nothing());
+
if (mClonedLayerTreeProperties) {
// Effective transforms are needed by ComputeDifferences().
mRoot->ComputeEffectiveTransforms(gfx::Matrix4x4());
didEffectiveTransforms = true;
// We need to compute layer tree differences even if we're not going to
// immediately use the resulting damage area, since ComputeDifferences
// is also responsible for invalidates intermediate surfaces in
@@ -433,20 +437,16 @@ LayerManagerComposite::UpdateAndRender()
InvalidateDebugOverlay(invalid, mRenderBounds);
if (!didEffectiveTransforms) {
// The results of our drawing always go directly into a pixel buffer,
// so we don't need to pass any global transform here.
mRoot->ComputeEffectiveTransforms(gfx::Matrix4x4());
}
- nsIntRegion opaque;
- LayerIntRegion visible;
- PostProcessLayers(mRoot, opaque, visible, Nothing());
-
Render(invalid);
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
RenderToPresentationSurface();
#endif
mGeometryChanged = false;
mWindowOverlayChanged = false;
// Update cached layer tree information.