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

Unified Diff: third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp

Issue 2738813003: Ensure the scheduler always changes from UseCase LOADING to NONE. (Closed)
Patch Set: rename markFirstMeaningfulPaintCandidate to setFirstMeaningfulPaintCandidate. delete errant comment. Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
diff --git a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
index 5b75deca1ecaa2adbd3f5da0cf28d46e95bae8de..34ab1db5ed5de7ecf31e483898b2558cdd30c748 100644
--- a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
+++ b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
@@ -113,7 +113,8 @@ void FirstMeaningfulPaintDetector::notifyPaint() {
m_seenFirstMeaningfulPaintCandidate = true;
return;
}
- m_paintTiming->markFirstMeaningfulPaintCandidate();
+ m_paintTiming->setFirstMeaningfulPaintCandidate(
+ m_provisionalFirstMeaningfulPaint);
}
int FirstMeaningfulPaintDetector::activeConnections() {
@@ -170,6 +171,11 @@ void FirstMeaningfulPaintDetector::network2QuietTimerFired(TimerBase*) {
m_network2QuietReached = true;
if (m_provisionalFirstMeaningfulPaint) {
+ // If there's only been one contentful paint, then there won't have been
+ // a meaningful paint signalled to the Scheduler, so mark one now.
+ // This is a no-op if a FMPC has already been marked.
+ m_paintTiming->setFirstMeaningfulPaintCandidate(
+ m_provisionalFirstMeaningfulPaint);
// Enforce FirstContentfulPaint <= FirstMeaningfulPaint.
m_firstMeaningfulPaint2Quiet =
std::max(m_provisionalFirstMeaningfulPaint,
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698