| Index: Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| diff --git a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| index f835c9a7e2d28857ee6f3fbd3c56e5c29499c47e..1f3fbb0b875e1041eaf979cdfffa406f5911030e 100644
|
| --- a/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| +++ b/Source/core/rendering/compositing/CompositingLayerAssigner.cpp
|
| @@ -27,6 +27,7 @@
|
| #include "config.h"
|
| #include "core/rendering/compositing/CompositingLayerAssigner.h"
|
|
|
| +#include "core/inspector/InspectorTraceEvents.h"
|
| #include "core/rendering/compositing/CompositedLayerMapping.h"
|
| #include "platform/TraceEvent.h"
|
|
|
| @@ -47,7 +48,7 @@ CompositingLayerAssigner::~CompositingLayerAssigner()
|
| {
|
| }
|
|
|
| -void CompositingLayerAssigner::assign(RenderLayer* updateRoot, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
|
| +void CompositingLayerAssigner::assign(RenderLayer* updateRoot, LayersNeedingPaintInvalidation& layersNeedingPaintInvalidation)
|
| {
|
| TRACE_EVENT0("blink", "CompositingLayerAssigner::assign");
|
|
|
| @@ -172,7 +173,7 @@ CompositingReasons CompositingLayerAssigner::getReasonsPreventingSquashing(const
|
| }
|
|
|
| void CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, SquashingState& squashingState, const CompositingStateTransitionType compositedLayerUpdate,
|
| - Vector<RenderLayer*>& layersNeedingPaintInvalidation)
|
| + LayersNeedingPaintInvalidation& layersNeedingPaintInvalidation)
|
| {
|
| // NOTE: In the future as we generalize this, the background of this layer may need to be assigned to a different backing than
|
| // the squashed RenderLayer's own primary contents. This would happen when we have a composited negative z-index element that needs
|
| @@ -195,7 +196,7 @@ void CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
|
| layer->clipper().clearClipRectsIncludingDescendants();
|
|
|
| // Issue a paint invalidation, since |layer| may have been added to an already-existing squashing layer.
|
| - layersNeedingPaintInvalidation.append(layer);
|
| + layersNeedingPaintInvalidation.append(std::make_pair(layer, InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer));
|
| m_layersChanged = true;
|
| } else if (compositedLayerUpdate == RemoveFromSquashingLayer) {
|
| if (layer->groupedMapping()) {
|
| @@ -206,18 +207,18 @@ void CompositingLayerAssigner::updateSquashingAssignment(RenderLayer* layer, Squ
|
| }
|
|
|
| // If we need to issue paint invalidations, do so now that we've removed it from a squashed layer.
|
| - layersNeedingPaintInvalidation.append(layer);
|
| + layersNeedingPaintInvalidation.append(std::make_pair(layer, InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer));
|
| m_layersChanged = true;
|
|
|
| layer->setLostGroupedMapping(false);
|
| }
|
| }
|
|
|
| -void CompositingLayerAssigner::assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
|
| +void CompositingLayerAssigner::assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer, LayersNeedingPaintInvalidation& layersNeedingPaintInvalidation)
|
| {
|
| CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(reflectionLayer);
|
| if (compositedLayerUpdate != NoCompositingStateChange) {
|
| - layersNeedingPaintInvalidation.append(reflectionLayer);
|
| + layersNeedingPaintInvalidation.append(std::make_pair(reflectionLayer, InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged));
|
| m_layersChanged = true;
|
| m_compositor->allocateOrClearCompositedLayerMapping(reflectionLayer, compositedLayerUpdate);
|
| }
|
| @@ -228,7 +229,7 @@ void CompositingLayerAssigner::assignLayersToBackingsForReflectionLayer(RenderLa
|
| reflectionLayer->compositedLayerMapping()->updateGraphicsLayerConfiguration();
|
| }
|
|
|
| -void CompositingLayerAssigner::assignLayersToBackingsInternal(RenderLayer* layer, SquashingState& squashingState, Vector<RenderLayer*>& layersNeedingPaintInvalidation)
|
| +void CompositingLayerAssigner::assignLayersToBackingsInternal(RenderLayer* layer, SquashingState& squashingState, LayersNeedingPaintInvalidation& layersNeedingPaintInvalidation)
|
| {
|
| if (m_layerSquashingEnabled && requiresSquashing(layer->compositingReasons())) {
|
| CompositingReasons reasonsPreventingSquashing = getReasonsPreventingSquashing(layer, squashingState);
|
| @@ -239,7 +240,7 @@ void CompositingLayerAssigner::assignLayersToBackingsInternal(RenderLayer* layer
|
| CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(layer);
|
|
|
| if (m_compositor->allocateOrClearCompositedLayerMapping(layer, compositedLayerUpdate)) {
|
| - layersNeedingPaintInvalidation.append(layer);
|
| + layersNeedingPaintInvalidation.append(std::make_pair(layer, InspectorLayerInvalidationTrackingEvent::NewCompositedLayer));
|
| m_layersChanged = true;
|
| }
|
|
|
|
|