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

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

Issue 2397753006: scheduler: Detect load RAIL mode (Closed)
Patch Set: Rebased Created 4 years 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
Index: third_party/WebKit/Source/core/paint/PaintTiming.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.cpp b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
index f87085b838c3eeaf5de00e7bed4e77de66bd05c9..b5964500258f47b528af52a1acbf486c6e3e5453 100644
--- a/third_party/WebKit/Source/core/paint/PaintTiming.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
@@ -5,8 +5,11 @@
#include "core/paint/PaintTiming.h"
#include "core/dom/Document.h"
+#include "core/frame/FrameView.h"
+#include "core/frame/LocalFrame.h"
#include "core/loader/DocumentLoader.h"
#include "platform/tracing/TraceEvent.h"
+#include "public/platform/WebFrameScheduler.h"
namespace blink {
@@ -65,6 +68,16 @@ void PaintTiming::markFirstImagePaint() {
notifyPaintTimingChanged();
}
+void PaintTiming::markFirstMeaningfulPaintCandidate() {
+ if (m_firstMeaningfulPaintCandidate)
+ return;
+ m_firstMeaningfulPaintCandidate = monotonicallyIncreasingTime();
+ if (m_document->frame() && m_document->frame()->view() &&
+ !m_document->frame()->view()->parent()) {
+ m_document->frame()->frameScheduler()->onFirstMeaningfulPaint();
+ }
+}
+
void PaintTiming::setFirstMeaningfulPaint(double stamp) {
DCHECK_EQ(m_firstMeaningfulPaint, 0.0);
m_firstMeaningfulPaint = stamp;

Powered by Google App Engine
This is Rietveld 408576698