| Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| index 7b329e4b43742f9a9cdd8e57da2989a2e2763a5b..f10bc01f75120e24477494b827ce34ce7d72b212 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
|
| @@ -23,6 +23,12 @@ const DisplayItems& DisplayItemList::displayItems() const
|
| return m_currentDisplayItems;
|
| }
|
|
|
| +const Vector<PaintChunk>& DisplayItemList::paintChunks() const
|
| +{
|
| + ASSERT(m_newPaintChunks.isInInitialState());
|
| + return m_currentPaintChunks;
|
| +}
|
| +
|
| bool DisplayItemList::lastDisplayItemIsNoopBegin() const
|
| {
|
| if (m_newDisplayItems.isEmpty())
|
| @@ -47,6 +53,7 @@ void DisplayItemList::removeLastDisplayItem()
|
| }
|
| #endif
|
| m_newDisplayItems.removeLast();
|
| + m_newPaintChunks.decrementDisplayItemIndex();
|
| }
|
|
|
| void DisplayItemList::processNewItem(DisplayItem& displayItem)
|
| @@ -84,6 +91,13 @@ void DisplayItemList::processNewItem(DisplayItem& displayItem)
|
|
|
| if (skippingCache())
|
| displayItem.setSkippedCache();
|
| +
|
| + m_newPaintChunks.incrementDisplayItemIndex();
|
| +}
|
| +
|
| +void DisplayItemList::updateCurrentPaintProperties(const PaintProperties& newPaintProperties)
|
| +{
|
| + m_newPaintChunks.updateCurrentPaintProperties(newPaintProperties);
|
| }
|
|
|
| void DisplayItemList::beginScope()
|
| @@ -272,6 +286,7 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
|
| ASSERT(!item.isCached());
|
| #endif
|
| m_currentDisplayItems.swap(m_newDisplayItems);
|
| + m_currentPaintChunks = m_newPaintChunks.releasePaintChunks();
|
| m_validlyCachedClientsDirty = true;
|
| m_numCachedItems = 0;
|
| return;
|
| @@ -288,6 +303,7 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
|
|
|
| // TODO(jbroman): Consider revisiting this heuristic.
|
| DisplayItems updatedList(std::max(m_currentDisplayItems.usedCapacityInBytes(), m_newDisplayItems.usedCapacityInBytes()));
|
| + Vector<PaintChunk> updatedPaintChunks;
|
| DisplayItems::iterator currentIt = m_currentDisplayItems.begin();
|
| DisplayItems::iterator currentEnd = m_currentDisplayItems.end();
|
| for (DisplayItems::iterator newIt = m_newDisplayItems.begin(); newIt != m_newDisplayItems.end(); ++newIt) {
|
| @@ -350,6 +366,10 @@ void DisplayItemList::commitNewDisplayItems(DisplayListDiff*)
|
| checkNoRemainingCachedDisplayItems();
|
| #endif // ENABLE(ASSERT)
|
|
|
| + // TODO(jbroman): When subsequence caching applies to SPv2, we'll need to
|
| + // merge the paint chunks as well.
|
| + m_currentPaintChunks = m_newPaintChunks.releasePaintChunks();
|
| +
|
| m_newDisplayItems.clear();
|
| m_validlyCachedClientsDirty = true;
|
| m_currentDisplayItems.swap(updatedList);
|
|
|