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..4dc47881884b36d836f9427f4525bcc2adc3b0ee 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
@@ -525,6 +525,15 @@ void PaintController::commitNewDisplayItems( |
if (item.skippedCache()) |
skippedCacheClients.push_back(&item.client()); |
} |
+ |
+ if (UNLIKELY(!m_firstPainted) && item.isDrawing() && |
pdr.
2017/01/12 22:21:55
This will still be called for all new and cached i
Xianzhu
2017/01/12 22:32:22
Done.
Considered this but thought the cost of 'if
|
+ // 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; |
+ } |
} |
for (auto* client : skippedCacheClients) |