Chromium Code Reviews| 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..d993b19d9843eaeb4492b169eecb1e02a2514be0 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
| @@ -173,6 +173,15 @@ const DisplayItem* PaintController::lastDisplayItem(unsigned offset) { |
| void PaintController::processNewItem(DisplayItem& displayItem) { |
| DCHECK(!m_constructionDisabled); |
| + if (!m_firstPainted && displayItem.isDrawing() && |
|
pdr.
2017/01/12 21:56:45
processNewItem is pretty hot so I'm worried about
Xianzhu
2017/01/12 22:13:39
Good idea. Done.
|
| + // 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. |
| + displayItem.getType() != DisplayItem::kDocumentBackground && |
| + displayItem.drawsContent()) { |
| + m_firstPainted = true; |
| + } |
| + |
| #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| if (!isSkippingCache()) { |
| if (displayItem.isCacheable()) { |