| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |