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 ecdfc3a5988db41f4d3f342ca2101f7733e2581f..dcb96b39b3063eb514e91bad473613871c33c727 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
| @@ -153,6 +153,13 @@ void PaintController::removeLastDisplayItem() |
| m_newPaintChunks.decrementDisplayItemIndex(); |
| } |
| +const DisplayItem* PaintController::lastDisplayItem(unsigned offset) |
| +{ |
| + if (offset < m_newDisplayItemList.size()) |
| + return &m_newDisplayItemList[m_newDisplayItemList.size() - offset - 1]; |
| + return nullptr; |
| +} |
| + |
| void PaintController::processNewItem(DisplayItem& displayItem) |
| { |
| DCHECK(!m_constructionDisabled); |
| @@ -422,6 +429,8 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb |
| if (item.isCacheable()) |
| item.client().setDisplayItemsCached(m_currentCacheGeneration); |
| + else |
| + item.client().setDisplayItemsUncached(); |
|
chrishtr
2016/07/27 17:47:48
@xianzhu: added this. WDYT?
Xianzhu
2016/07/27 18:00:19
This has a problem that if any cacheable display i
|
| } |
| // The new list will not be appended to again so we can release unused memory. |