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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintController.h

Issue 2623043002: Fix first paint tracking for SPv2 (Closed)
Patch Set: - Created 3 years, 11 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
Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
index b7aecc0ce545b5059e5cb82c47c0257728463bce..7d5c514e7d5375b801a3baaf4fce6e7497afdf1b 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.h
@@ -160,18 +160,13 @@ class PLATFORM_EXPORT PaintController {
m_subsequenceCachingDisabled = disable;
}
+ bool firstPainted() const { return m_firstPainted; }
+ void setFirstPainted() { m_firstPainted = true; }
bool textPainted() const { return m_textPainted; }
void setTextPainted() { m_textPainted = true; }
bool imagePainted() const { return m_imagePainted; }
void setImagePainted() { m_imagePainted = true; }
- bool nonDefaultBackgroundColorPainted() const {
- return m_nonDefaultBackgroundColorPainted;
- }
- void setNonDefaultBackgroundColorPainted() {
- m_nonDefaultBackgroundColorPainted = true;
- }
-
// Returns displayItemList added using createAndAppend() since beginning or
// the last commitNewDisplayItems(). Use with care.
DisplayItemList& newDisplayItemList() { return m_newDisplayItemList; }
@@ -204,9 +199,9 @@ class PLATFORM_EXPORT PaintController {
: m_newDisplayItemList(0),
m_constructionDisabled(false),
m_subsequenceCachingDisabled(false),
+ m_firstPainted(false),
m_textPainted(false),
m_imagePainted(false),
- m_nonDefaultBackgroundColorPainted(false),
m_skippingCacheCount(0),
m_numCachedNewItems(0),
m_currentCachedSubsequenceBeginIndexInNewList(kNotFound)
@@ -306,11 +301,13 @@ class PLATFORM_EXPORT PaintController {
// caching.
bool m_subsequenceCachingDisabled;
- // Indicates this PaintController has ever had text. It is never reset to
- // false.
+ // The following fields indicate that this PaintController has ever had
+ // first-paint, text or image painted. They are never reset to false.
+ // First-paint is defined in https://github.com/WICG/paint-timing. It excludes
+ // default background paint.
+ bool m_firstPainted;
bool m_textPainted;
bool m_imagePainted;
- bool m_nonDefaultBackgroundColorPainted;
int m_skippingCacheCount;

Powered by Google App Engine
This is Rietveld 408576698