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

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

Issue 575353002: Don't squash into RenderPart subclasses. Don't squash into video elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed. Created 6 years, 3 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/platform/win/media/video-paint-invalidation-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/CompositingLayerAssigner.cpp
diff --git a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
index 373a95089479f819c5c3a501dcb9e84c10d02c6c..53dd66887c3fbe3ff34d1f51192da69d195768d5 100644
--- a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
+++ b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
@@ -121,6 +121,9 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
if (!squashingState.haveAssignedBackingsToEntireSquashingLayerSubtree)
return CompositingReasonSquashingWouldBreakPaintOrder;
+ ASSERT(squashingState.hasMostRecentMapping);
+ const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owningLayer();
+
// FIXME: this special case for video exists only to deal with corner cases
// where a RenderVideo does not report that it needs to be directly composited.
// Video does not currently support sharing a backing, but this could be
@@ -128,12 +131,12 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
// video to share a backing with other layers.
//
// compositing/video/video-controls-layer-creation.html
- if (layer->renderer()->isVideo())
+ if (layer->renderer()->isVideo() || squashingLayer.renderer()->isVideo())
return CompositingReasonSquashingVideoIsDisallowed;
// Don't squash iframes, frames or plugins.
// FIXME: this is only necessary because there is frame code that assumes that composited frames are not squashed.
- if (layer->renderer()->isRenderPart())
+ if (layer->renderer()->isRenderPart() || squashingLayer.renderer()->isRenderPart())
return CompositingReasonSquashingRenderPartIsDisallowed;
if (layer->reflectionInfo())
@@ -142,10 +145,7 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
if (squashingWouldExceedSparsityTolerance(layer, squashingState))
return CompositingReasonSquashingSparsityExceeded;
- // FIXME: this is not efficient, since it walks up the tree . We should store these values on the CompositingInputsCache.
- ASSERT(squashingState.hasMostRecentMapping);
- const RenderLayer& squashingLayer = squashingState.mostRecentMapping->owningLayer();
-
+ // FIXME: this is not efficient, since it walks up the tree. We should store these values on the CompositingInputsCache.
if (layer->clippingContainer() != squashingLayer.clippingContainer() && !squashingLayer.compositedLayerMapping()->containingSquashedLayer(layer->clippingContainer()))
return CompositingReasonSquashingClippingContainerMismatch;
« no previous file with comments | « LayoutTests/platform/win/media/video-paint-invalidation-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698