Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-webkit: Commit

external/webkit


Commit MetaInfo

Revision3c049d2aded213c7bcc49cdb7283cf0fcb509644 (tree)
Time2012-01-13 10:29:34
AuthorNicolas Roard <nicolasroard@goog...>
CommiterNicolas Roard

Log Message

Prevent infinite loop when turning on then off composited mode

bug:5820635
Change-Id: I24b6eae6c76c29e44106b4ec87e74d945aad7b1b

Change Summary

Incremental Difference

--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp
+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp
@@ -1366,7 +1366,21 @@ bool RenderLayerCompositor::needsToBeComposited(const RenderLayer* layer) const
13661366 return false;
13671367
13681368 // The root layer always has a compositing layer, but it may not have backing.
1369+#if PLATFORM(ANDROID)
1370+ // If we do not have a root platform layer, don't use the
1371+ // mustOverlapCompositedLayers() as a cue that this layer needs to be
1372+ // composited -- the layers tree has been detached.
1373+ // Otherwise we can end up in a cycle where updateBacking() switches composited
1374+ // mode on because a layer has mustOverlapCompositedLayers() (by calling
1375+ // enableCompositingMode()), while computeCompositingRequirements() will
1376+ // (correctly) say that we do not need to be in composited mode and turns it
1377+ // off, rince and repeat...
1378+ return requiresCompositingLayer(layer)
1379+ || (m_rootPlatformLayer && layer->mustOverlapCompositedLayers())
1380+ || (inCompositingMode() && layer->isRootLayer());
1381+#else
13691382 return requiresCompositingLayer(layer) || layer->mustOverlapCompositedLayers() || (inCompositingMode() && layer->isRootLayer());
1383+#endif
13701384 }
13711385
13721386 #if PLATFORM(ANDROID)
Show on old repository browser