#include "config.h"
#include "core/rendering/compositing/CompositingLayerAssigner.h"
+#include "core/inspector/InspectorTraceEvents.h"
#include "core/rendering/compositing/CompositedLayerMapping.h"
#include "platform/TraceEvent.h"
if (squashingWouldExceedSparsityTolerance(layer, squashingState))
return CompositingReasonSquashingSparsityExceeded;
+ if (layer->renderer()->hasBlendMode())
+ return CompositingReasonSquashingBlendingIsDisallowed;
+
// 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()))
+ if (layer->clippingContainer() != squashingLayer.clippingContainer() && !squashingLayer.compositedLayerMapping()->containingSquashedLayer(layer->clippingContainer(), squashingState.nextSquashedLayerIndex))
return CompositingReasonSquashingClippingContainerMismatch;
// Composited descendants need to be clipped by a child containment graphics layer, which would not be available if the layer is
layer->clipper().clearClipRectsIncludingDescendants();
// Issue a paint invalidation, since |layer| may have been added to an already-existing squashing layer.
+ TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer);
layersNeedingPaintInvalidation.append(layer);
m_layersChanged = true;
} else if (compositedLayerUpdate == RemoveFromSquashingLayer) {
}
// If we need to issue paint invalidations, do so now that we've removed it from a squashed layer.
+ TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer);
layersNeedingPaintInvalidation.append(layer);
m_layersChanged = true;
{
CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(reflectionLayer);
if (compositedLayerUpdate != NoCompositingStateChange) {
+ TRACE_LAYER_INVALIDATION(reflectionLayer, InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged);
layersNeedingPaintInvalidation.append(reflectionLayer);
m_layersChanged = true;
m_compositor->allocateOrClearCompositedLayerMapping(reflectionLayer, compositedLayerUpdate);
CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(layer);
if (m_compositor->allocateOrClearCompositedLayerMapping(layer, compositedLayerUpdate)) {
+ TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent::NewCompositedLayer);
layersNeedingPaintInvalidation.append(layer);
m_layersChanged = true;
}