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

Unified Diff: Source/core/inspector/InspectorTimelineAgent.cpp

Issue 14741014: Timeline: add reference to root node of layer in Rasterize event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | « Source/core/inspector/InspectorTimelineAgent.h ('k') | Source/core/inspector/TimelineRecordFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index d2b90fca25b7960c0c4ccb7985ec4931f45e6d04..a044bdf42f00653200fc3d89281f7b0ecf220cb0 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -49,6 +49,7 @@
#include "core/page/Frame.h"
#include "core/page/FrameView.h"
#include "core/platform/MemoryUsageSupport.h"
+#include "core/platform/chromium/TraceEvent.h"
#include "core/platform/graphics/IntRect.h"
#include "core/platform/network/ResourceRequest.h"
#include "core/platform/network/ResourceResponse.h"
@@ -359,8 +360,13 @@ void InspectorTimelineAgent::didRecalculateStyleForElement()
++m_styleRecalcElementCounter;
}
-void InspectorTimelineAgent::willPaint(Frame* frame)
+void InspectorTimelineAgent::willPaint(RenderObject* renderer)
{
+ Frame* frame = renderer->frame();
+ TRACE_EVENT_INSTANT2("instrumentation", InstrumentationEvents::Paint,
+ InstrumentationEventArguments::PageId, reinterpret_cast<unsigned long long>(frame->page()),
+ InstrumentationEventArguments::NodeId, idForNode(renderer->generatingNode()));
+
pushCurrentRecord(InspectorObject::create(), TimelineRecordType::Paint, true, frame, true);
}
@@ -793,7 +799,7 @@ void InspectorTimelineAgent::localToPageQuad(const RenderObject& renderer, const
quad->setP4(view->contentsToRootView(roundedIntPoint(absolute.p4())));
}
-int InspectorTimelineAgent::idForNode(Node* node)
+long long InspectorTimelineAgent::idForNode(Node* node)
{
return m_domAgent && node ? m_domAgent->backendNodeIdForNode(node, BackendNodeIdGroup) : 0;
}
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.h ('k') | Source/core/inspector/TimelineRecordFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698