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

Unified Diff: Source/core/inspector/InspectorTraceEvents.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/inspector/InspectorTraceEvents.cpp
diff --git a/Source/core/inspector/InspectorTraceEvents.cpp b/Source/core/inspector/InspectorTraceEvents.cpp
index 2fd955c2b74ecf3b5bfb45d8aa165dcf85aba0cf..c0b27e15388212cecb493e795eb3720044a0f32b 100644
--- a/Source/core/inspector/InspectorTraceEvents.cpp
+++ b/Source/core/inspector/InspectorTraceEvents.cpp
@@ -16,6 +16,7 @@
#include "core/inspector/ScriptCallStack.h"
#include "core/page/Page.h"
#include "core/rendering/RenderImage.h"
+#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderObject.h"
#include "core/workers/WorkerThread.h"
#include "core/xml/XMLHttpRequest.h"
@@ -257,6 +258,24 @@ static void localToPageQuad(const RenderObject& renderer, const LayoutRect& rect
quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4())));
}
+const char InspectorLayerInvalidationTrackingEvent::SquashingLayerGeometryWasUpdated[] = "Squashing layer geometry was updated.";
+const char InspectorLayerInvalidationTrackingEvent::AddedToSquashingLayer[] = "The layer may have been added to an already-existing squashing layer.";
+const char InspectorLayerInvalidationTrackingEvent::RemovedFromSquashingLayer[] = "Removed the layer from a squashing layer.";
+const char InspectorLayerInvalidationTrackingEvent::ReflectionLayerChanged[] = "Reflection layer change.";
+const char InspectorLayerInvalidationTrackingEvent::NewCompositedLayer[] = "Assigned a new composited layer.";
+const char InspectorLayerInvalidationTrackingEvent::AncestorRequiresNewLayer[] = "A new composited layer is needed based on the RenderLayer's compositing ancestor's properties.";
+
+PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorLayerInvalidationTrackingEvent::data(const RenderLayer* layer, const char* reason)
+{
+ const RenderObject* paintInvalidationContainer = layer->renderer()->containerForPaintInvalidation();
+
+ RefPtr<TracedValue> value = TracedValue::create();
+ value->setString("frame", toHexString(paintInvalidationContainer->frame()));
+ setGeneratingNodeId(value.get(), "paintId", paintInvalidationContainer);
+ value->setString("reason", reason);
+ return value;
+}
+
PassRefPtr<TraceEvent::ConvertableToTraceFormat> InspectorPaintEvent::data(RenderObject* renderer, const LayoutRect& clipRect, const GraphicsLayer* graphicsLayer)
{
RefPtr<TracedValue> value = TracedValue::create();
« no previous file with comments | « Source/core/inspector/InspectorTraceEvents.h ('k') | Source/core/rendering/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698