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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintTiming.cpp

Issue 1690533002: Turn firstPaint and firstContentfulPaint into instant trace events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintTiming.h" 5 #include "core/paint/PaintTiming.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/loader/DocumentLoader.h" 8 #include "core/loader/DocumentLoader.h"
9 #include "platform/TraceEvent.h" 9 #include "platform/TraceEvent.h"
10 #include "wtf/RawPtr.h" 10 #include "wtf/RawPtr.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 { 42 {
43 if (m_document && m_document->loader()) 43 if (m_document && m_document->loader())
44 m_document->loader()->didChangePerformanceTiming(); 44 m_document->loader()->didChangePerformanceTiming();
45 } 45 }
46 46
47 void PaintTiming::markFirstPaint() 47 void PaintTiming::markFirstPaint()
48 { 48 {
49 if (m_firstPaint != 0.0) 49 if (m_firstPaint != 0.0)
50 return; 50 return;
51 m_firstPaint = monotonicallyIncreasingTime(); 51 m_firstPaint = monotonicallyIncreasingTime();
52 TRACE_EVENT_MARK_WITH_TIMESTAMP1("blink.user_timing", "firstPaint", m_firstP aint, "frame", frame()); 52 TRACE_EVENT_INSTANT1("blink.user_timing", "firstPaint", TRACE_EVENT_SCOPE_PR OCESS, "frame", frame());
53 notifyPaintTimingChanged(); 53 notifyPaintTimingChanged();
54 } 54 }
55 55
56 void PaintTiming::markFirstTextPaint() 56 void PaintTiming::markFirstTextPaint()
57 { 57 {
58 if (m_firstTextPaint != 0.0) 58 if (m_firstTextPaint != 0.0)
59 return; 59 return;
60 m_firstTextPaint = monotonicallyIncreasingTime(); 60 m_firstTextPaint = monotonicallyIncreasingTime();
61 TRACE_EVENT_MARK_WITH_TIMESTAMP1("blink.user_timing", "firstTextPaint", m_fi rstTextPaint, "frame", frame()); 61 TRACE_EVENT_MARK_WITH_TIMESTAMP1("blink.user_timing", "firstTextPaint", m_fi rstTextPaint, "frame", frame());
62 62
(...skipping 14 matching lines...) Expand all
77 markFirstContentfulPaint(); 77 markFirstContentfulPaint();
78 else 78 else
79 notifyPaintTimingChanged(); 79 notifyPaintTimingChanged();
80 } 80 }
81 81
82 void PaintTiming::markFirstContentfulPaint() 82 void PaintTiming::markFirstContentfulPaint()
83 { 83 {
84 if (m_firstContentfulPaint != 0.0) 84 if (m_firstContentfulPaint != 0.0)
85 return; 85 return;
86 m_firstContentfulPaint = monotonicallyIncreasingTime(); 86 m_firstContentfulPaint = monotonicallyIncreasingTime();
87 TRACE_EVENT_MARK_WITH_TIMESTAMP1("blink.user_timing", "firstContentfulPaint" , m_firstContentfulPaint, "frame", frame()); 87 TRACE_EVENT_INSTANT1("blink.user_timing", "firstContentfulPaint", TRACE_EVEN T_SCOPE_PROCESS, "frame", frame());
88 notifyPaintTimingChanged(); 88 notifyPaintTimingChanged();
89 } 89 }
90 90
91 } // namespace blink 91 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698