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

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

Issue 565793003: [Invalidation Tracking] Add trace events for compositor based invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use cmacro 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
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..373a95089479f819c5c3a501dcb9e84c10d02c6c 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"
@@ -195,6 +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.
+ TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer);
layersNeedingPaintInvalidation.append(layer);
m_layersChanged = true;
} else if (compositedLayerUpdate == RemoveFromSquashingLayer) {
@@ -206,6 +208,7 @@ 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.
+ TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer);
layersNeedingPaintInvalidation.append(layer);
m_layersChanged = true;
@@ -217,6 +220,7 @@ void CompositingLayerAssigner::assignLayersToBackingsForReflectionLayer(RenderLa
{
CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(reflectionLayer);
if (compositedLayerUpdate != NoCompositingStateChange) {
+ TRACE_LAYER_INVALIDATION(reflectionLayer, InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged);
layersNeedingPaintInvalidation.append(reflectionLayer);
m_layersChanged = true;
m_compositor->allocateOrClearCompositedLayerMapping(reflectionLayer, compositedLayerUpdate);
@@ -239,6 +243,7 @@ void CompositingLayerAssigner::assignLayersToBackingsInternal(RenderLayer* layer
CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(layer);
if (m_compositor->allocateOrClearCompositedLayerMapping(layer, compositedLayerUpdate)) {
+ TRACE_LAYER_INVALIDATION(layer, InspectorLayerInvalidationTrackingEvent::NewCompositedLayer);
layersNeedingPaintInvalidation.append(layer);
m_layersChanged = true;
}

Powered by Google App Engine
This is Rietveld 408576698