| Index: Source/platform/graphics/paint/DisplayItemList.cpp
|
| diff --git a/Source/platform/graphics/paint/DisplayItemList.cpp b/Source/platform/graphics/paint/DisplayItemList.cpp
|
| index 4ab57645977aea021603cc6a739c4005d75bf2e0..a8a034449e2865a067aaced84f9286409a2f825c 100644
|
| --- a/Source/platform/graphics/paint/DisplayItemList.cpp
|
| +++ b/Source/platform/graphics/paint/DisplayItemList.cpp
|
| @@ -32,6 +32,19 @@ const DisplayItems& DisplayItemList::displayItems() const
|
| return m_currentDisplayItems;
|
| }
|
|
|
| +const WebVector<WebDisplayItem>& DisplayItemList::webDisplayItems() const
|
| +{
|
| + return m_webDisplayItems;
|
| +}
|
| +
|
| +const skia::DiscardablePixelRefList& DisplayItemList::pixelRefs() const
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::slimmingPaintCompositorLayerizationEnabled());
|
| + ASSERT(m_newPixelRefs.empty());
|
| + return m_currentPixelRefs;
|
| +}
|
| +
|
| +
|
| bool DisplayItemList::lastDisplayItemIsNoopBegin() const
|
| {
|
| ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
|
| @@ -60,6 +73,11 @@ void DisplayItemList::removeLastDisplayItem()
|
| m_newDisplayItems.removeLast();
|
| }
|
|
|
| +void DisplayItemList::addPixelRef(const skia::PixelRefUtils::PositionPixelRef& pixelRef)
|
| +{
|
| + m_newPixelRefs.push_back(pixelRef);
|
| +}
|
| +
|
| void DisplayItemList::processNewItem(DisplayItem* displayItem)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
|
| @@ -216,7 +234,8 @@ DisplayItems::Iterator DisplayItemList::findOutOfOrderCachedItemForward(DisplayI
|
| // The algorithm is O(|m_currentDisplayItems| + |m_newDisplayItems|).
|
| // Coefficients are related to the ratio of out-of-order [Subtree]CachedDisplayItems
|
| // and the average number of (Drawing|BeginSubtree)DisplayItems per client.
|
| -void DisplayItemList::commitNewDisplayItems()
|
| +// TODO(chrishtr); implement filling of displayListDiff.
|
| +void DisplayItemList::commitNewDisplayItems(WebDisplayListDiff* displayListDiff)
|
| {
|
| TRACE_EVENT2("blink,benchmark", "DisplayItemList::commitNewDisplayItems", "current_display_list_size", (int)m_currentDisplayItems.size(),
|
| "num_non_cached_new_items", (int)m_newDisplayItems.size() - m_numCachedItems);
|
| @@ -240,6 +259,7 @@ void DisplayItemList::commitNewDisplayItems()
|
| m_currentDisplayItems.swap(m_newDisplayItems);
|
| m_validlyCachedClientsDirty = true;
|
| m_numCachedItems = 0;
|
| + m_currentPixelRefs.swap(m_newPixelRefs);
|
| return;
|
| }
|
|
|
| @@ -325,6 +345,7 @@ void DisplayItemList::commitNewDisplayItems()
|
| m_newDisplayItems.clear();
|
| m_validlyCachedClientsDirty = true;
|
| m_currentDisplayItems.swap(updatedList);
|
| + m_currentPixelRefs.swap(m_newPixelRefs);
|
| m_numCachedItems = 0;
|
| }
|
|
|
|
|