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

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

Issue 2802313002: DevTools: do not report paint metrics under blink.user_timing category. (Closed)
Patch Set: rebaselined Created 3 years, 8 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 | third_party/WebKit/Source/core/paint/PaintTiming.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/FirstMeaningfulPaintDetector.h" 5 #include "core/paint/FirstMeaningfulPaintDetector.h"
6 6
7 #include "core/css/FontFaceSet.h" 7 #include "core/css/FontFaceSet.h"
8 #include "core/dom/TaskRunnerHelper.h" 8 #include "core/dom/TaskRunnerHelper.h"
9 #include "core/paint/PaintTiming.h" 9 #include "core/paint/PaintTiming.h"
10 #include "platform/Histogram.h" 10 #include "platform/Histogram.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 if (paint_timing_->FirstPaint() == 0.0) 92 if (paint_timing_->FirstPaint() == 0.0)
93 return; 93 return;
94 94
95 provisional_first_meaningful_paint_ = MonotonicallyIncreasingTime(); 95 provisional_first_meaningful_paint_ = MonotonicallyIncreasingTime();
96 next_paint_is_meaningful_ = false; 96 next_paint_is_meaningful_ = false;
97 97
98 if (network2_quiet_reached_) 98 if (network2_quiet_reached_)
99 return; 99 return;
100 100
101 TRACE_EVENT_MARK_WITH_TIMESTAMP1( 101 TRACE_EVENT_MARK_WITH_TIMESTAMP1(
102 "loading", "firstMeaningfulPaintCandidate", 102 "loading,devtools.timeline", "firstMeaningfulPaintCandidate",
103 TraceEvent::ToTraceTimestamp(provisional_first_meaningful_paint_), 103 TraceEvent::ToTraceTimestamp(provisional_first_meaningful_paint_),
104 "frame", GetDocument()->GetFrame()); 104 "frame", GetDocument()->GetFrame());
105 // Ignore the first meaningful paint candidate as this generally is the first 105 // Ignore the first meaningful paint candidate as this generally is the first
106 // contentful paint itself. 106 // contentful paint itself.
107 if (!seen_first_meaningful_paint_candidate_) { 107 if (!seen_first_meaningful_paint_candidate_) {
108 seen_first_meaningful_paint_candidate_ = true; 108 seen_first_meaningful_paint_candidate_ = true;
109 return; 109 return;
110 } 110 }
111 paint_timing_->SetFirstMeaningfulPaintCandidate( 111 paint_timing_->SetFirstMeaningfulPaintCandidate(
112 provisional_first_meaningful_paint_); 112 provisional_first_meaningful_paint_);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } else if (first_meaningful_paint2_quiet_) { 222 } else if (first_meaningful_paint2_quiet_) {
223 had_network_quiet_histogram.Count(kHadNetwork2Quiet); 223 had_network_quiet_histogram.Count(kHadNetwork2Quiet);
224 } 224 }
225 } 225 }
226 226
227 DEFINE_TRACE(FirstMeaningfulPaintDetector) { 227 DEFINE_TRACE(FirstMeaningfulPaintDetector) {
228 visitor->Trace(paint_timing_); 228 visitor->Trace(paint_timing_);
229 } 229 }
230 230
231 } // namespace blink 231 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698