Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1343)

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 212923005: Do not squash invisible layers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid mucking with canBeComposited Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/compositing/squashing/invisible-layers-should-not-affect-geometry-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index 0b4403f6cd5c025d8e163e72e8fc1690f9a2ffcb..039c79280a930ae150941f95b1aa0b28d70c9959 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -783,7 +783,7 @@ bool RenderLayerCompositor::canSquashIntoCurrentSquashingOwner(const RenderLayer
RenderLayerCompositor::CompositingStateTransitionType RenderLayerCompositor::computeCompositedLayerUpdate(RenderLayer* layer)
{
CompositingStateTransitionType update = NoCompositingStateChange;
- if (needsOwnBacking(layer)) {
+ if (!layer->subtreeIsInvisible() && needsOwnBacking(layer)) {
if (!layer->hasCompositedLayerMapping()) {
update = AllocateOwnCompositedLayerMapping;
}
@@ -792,7 +792,7 @@ RenderLayerCompositor::CompositingStateTransitionType RenderLayerCompositor::com
update = RemoveOwnCompositedLayerMapping;
if (layerSquashingEnabled()) {
- if (requiresSquashing(layer->compositingReasons())) {
+ if (!layer->subtreeIsInvisible() && requiresSquashing(layer->compositingReasons())) {
// We can't compute at this time whether the squashing layer update is a no-op,
// since that requires walking the render layer tree.
update = PutInSquashingLayer;
« no previous file with comments | « LayoutTests/compositing/squashing/invisible-layers-should-not-affect-geometry-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698