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

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

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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
index 4f0fc551f1ad0ec13d3c1c1fc29fbc8e28792ba3..d01671376eb2b40f0b87852327598cdc732ac5d6 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -527,6 +527,21 @@ void PaintController::commitNewDisplayItems(
}
}
+ if (!m_firstPainted) {
+ for (const auto& item : m_newDisplayItemList) {
+ if (item.isDrawing() &&
+ // Here we ignore all document-background paintings because we don't
+ // know if the background is default. ViewPainter should have called
+ // setFirstPainted() if this display item is for non-default
+ // background.
+ item.getType() != DisplayItem::kDocumentBackground &&
+ item.drawsContent()) {
+ m_firstPainted = true;
+ break;
+ }
+ }
+ }
+
for (auto* client : skippedCacheClients)
client->setDisplayItemsUncached();
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/paint/PaintController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698