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

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

Issue 91183002: Timeline: do not rely on UpdateLayer & PaintLayer trace events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: re-upload Created 7 years, 1 month 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/TimelineTraceEventProcessor.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 5dd0bc6ff7d76e4beb00772bb27dfe99913088d1..4e7f684760b28bfa1b8168ea18f3d1fe3e649bc5 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -457,13 +457,13 @@ void InspectorTimelineAgent::didRecalculateStyleForElement()
++m_styleRecalcElementCounter;
}
-void InspectorTimelineAgent::willPaint(RenderObject* renderer)
+void InspectorTimelineAgent::willPaint(RenderObject* renderer, const GraphicsLayer* graphicsLayer)
{
Frame* frame = renderer->frame();
- TRACE_EVENT_INSTANT2(InternalEventCategory, InstrumentationEvents::Paint,
- InstrumentationEventArguments::PageId, reinterpret_cast<unsigned long long>(frame->page()),
- InstrumentationEventArguments::NodeId, nodeId(renderer));
-
+ m_nodeBeingPainted = nodeId(renderer);
+ m_layerBeingPainted = graphicsLayer ? graphicsLayer->platformLayer()->id() : 0;
+ TRACE_EVENT_INSTANT1(InternalEventCategory, InstrumentationEvents::Paint,
+ InstrumentationEventArguments::PageId, reinterpret_cast<unsigned long long>(frame->page()));
pushCurrentRecord(JSONObject::create(), TimelineRecordType::Paint, true, frame, true);
}
@@ -475,6 +475,8 @@ void InspectorTimelineAgent::didPaint(RenderObject* renderer, const GraphicsLaye
localToPageQuad(*renderer, clipRect, &quad);
int graphicsLayerId = graphicsLayer ? graphicsLayer->platformLayer()->id() : 0;
entry.data = TimelineRecordFactory::createPaintData(quad, nodeId(renderer), graphicsLayerId);
+ m_nodeBeingPainted = 0;
+ m_layerBeingPainted = 0;
didCompleteCurrentRecord(TimelineRecordType::Paint);
}
@@ -904,6 +906,8 @@ InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentin
, m_styleRecalcElementCounter(0)
, m_layerTreeId(0)
, m_imageBeingPainted(0)
+ , m_nodeBeingPainted(0)
+ , m_layerBeingPainted(0)
, m_overlay(overlay)
{
}
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.h ('k') | Source/core/inspector/TimelineTraceEventProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698