| Index: third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
|
| index 749768194a09eb247f41ce0339d6d8a05652bbf0..e83f8b3c0f8a6ecdd46c393fdc44b1fcad7ad645 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
|
| @@ -8,7 +8,7 @@
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
| #include "platform/graphics/paint/CachedDisplayItem.h"
|
| -#include "platform/graphics/paint/DisplayItemList.h"
|
| +#include "platform/graphics/paint/PaintController.h"
|
| #include "platform/graphics/paint/SubsequenceDisplayItem.h"
|
|
|
| namespace blink {
|
| @@ -18,15 +18,15 @@ bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& contex
|
| if (!RuntimeEnabledFeatures::slimmingPaintSubsequenceCachingEnabled())
|
| return false;
|
|
|
| - ASSERT(context.displayItemList());
|
| + ASSERT(context.paintController());
|
|
|
| - if (context.displayItemList()->displayItemConstructionIsDisabled())
|
| + if (context.paintController()->displayItemConstructionIsDisabled())
|
| return false;
|
|
|
| - if (!context.displayItemList()->clientCacheIsValid(client.displayItemClient()))
|
| + if (!context.paintController()->clientCacheIsValid(client.displayItemClient()))
|
| return false;
|
|
|
| - context.displayItemList()->createAndAppend<CachedDisplayItem>(client, DisplayItem::subsequenceTypeToCachedSubsequenceType(type));
|
| + context.paintController()->createAndAppend<CachedDisplayItem>(client, DisplayItem::subsequenceTypeToCachedSubsequenceType(type));
|
|
|
| #if ENABLE(ASSERT)
|
| // When under-invalidation checking is enabled, we output CachedSubsequence display item
|
| @@ -39,7 +39,7 @@ bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& contex
|
| }
|
|
|
| SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context, const DisplayItemClientWrapper& client, DisplayItem::Type type)
|
| - : m_displayItemList(context.displayItemList())
|
| + : m_paintController(context.paintController())
|
| , m_client(client)
|
| , m_beginSubsequenceIndex(0)
|
| , m_type(type)
|
| @@ -47,12 +47,12 @@ SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context, const Display
|
| if (!RuntimeEnabledFeatures::slimmingPaintSubsequenceCachingEnabled())
|
| return;
|
|
|
| - ASSERT(m_displayItemList);
|
| - if (m_displayItemList->displayItemConstructionIsDisabled())
|
| + ASSERT(m_paintController);
|
| + if (m_paintController->displayItemConstructionIsDisabled())
|
| return;
|
|
|
| - m_beginSubsequenceIndex = m_displayItemList->newDisplayItems().size();
|
| - m_displayItemList->createAndAppend<BeginSubsequenceDisplayItem>(m_client, type);
|
| + m_beginSubsequenceIndex = m_paintController->newDisplayItems().size();
|
| + m_paintController->createAndAppend<BeginSubsequenceDisplayItem>(m_client, type);
|
| }
|
|
|
| SubsequenceRecorder::~SubsequenceRecorder()
|
| @@ -60,20 +60,20 @@ SubsequenceRecorder::~SubsequenceRecorder()
|
| if (!RuntimeEnabledFeatures::slimmingPaintSubsequenceCachingEnabled())
|
| return;
|
|
|
| - if (m_displayItemList->displayItemConstructionIsDisabled())
|
| + if (m_paintController->displayItemConstructionIsDisabled())
|
| return;
|
|
|
| - if (m_displayItemList->lastDisplayItemIsNoopBegin()) {
|
| - ASSERT(m_beginSubsequenceIndex == m_displayItemList->newDisplayItems().size() - 1);
|
| + if (m_paintController->lastDisplayItemIsNoopBegin()) {
|
| + ASSERT(m_beginSubsequenceIndex == m_paintController->newDisplayItems().size() - 1);
|
| // Remove uncacheable no-op BeginSubsequence/EndSubsequence pairs.
|
| // Don't remove cacheable no-op pairs because we need to match them later with CachedSubsequences.
|
| - if (m_displayItemList->newDisplayItems().last().skippedCache()) {
|
| - m_displayItemList->removeLastDisplayItem();
|
| + if (m_paintController->newDisplayItems().last().skippedCache()) {
|
| + m_paintController->removeLastDisplayItem();
|
| return;
|
| }
|
| }
|
|
|
| - m_displayItemList->createAndAppend<EndSubsequenceDisplayItem>(m_client, DisplayItem::subsequenceTypeToEndSubsequenceType(m_type));
|
| + m_paintController->createAndAppend<EndSubsequenceDisplayItem>(m_client, DisplayItem::subsequenceTypeToEndSubsequenceType(m_type));
|
| }
|
|
|
| void SubsequenceRecorder::setUncacheable()
|
| @@ -81,11 +81,11 @@ void SubsequenceRecorder::setUncacheable()
|
| if (!RuntimeEnabledFeatures::slimmingPaintSubsequenceCachingEnabled())
|
| return;
|
|
|
| - if (m_displayItemList->displayItemConstructionIsDisabled())
|
| + if (m_paintController->displayItemConstructionIsDisabled())
|
| return;
|
|
|
| - ASSERT(m_displayItemList->newDisplayItems()[m_beginSubsequenceIndex].isSubsequence());
|
| - m_displayItemList->newDisplayItems()[m_beginSubsequenceIndex].setSkippedCache();
|
| + ASSERT(m_paintController->newDisplayItems()[m_beginSubsequenceIndex].isSubsequence());
|
| + m_paintController->newDisplayItems()[m_beginSubsequenceIndex].setSkippedCache();
|
| }
|
|
|
| } // namespace blink
|
|
|