Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp

Issue 1425593007: Separate display item clients for negative and normal/positive z-order children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Struct DisplayItemClient Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 4531fe9b49199e3a057b535c0444e7a90a6bfb01..45067bcca0de7b500fc2a34a4f40a62d89dcb873 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
@@ -13,7 +13,7 @@
namespace blink {
-bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& context, const DisplayItemClientWrapper& client, DisplayItem::Type type)
+bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& context, const DisplayItemClientWrapper& client)
{
if (!RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
return false;
@@ -24,7 +24,7 @@ bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& contex
if (!context.paintController().clientCacheIsValid(client.displayItemClient()))
return false;
- context.paintController().createAndAppend<CachedDisplayItem>(client, DisplayItem::subsequenceTypeToCachedSubsequenceType(type));
+ context.paintController().createAndAppend<CachedDisplayItem>(client, DisplayItem::CachedSubsequence);
#if ENABLE(ASSERT)
// When under-invalidation checking is enabled, we output CachedSubsequence display item
@@ -36,11 +36,10 @@ bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& contex
return true;
}
-SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context, const DisplayItemClientWrapper& client, DisplayItem::Type type)
+SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context, const DisplayItemClientWrapper& client)
: m_paintController(context.paintController())
, m_client(client)
, m_beginSubsequenceIndex(0)
- , m_type(type)
{
if (!RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled())
return;
@@ -49,7 +48,7 @@ SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context, const Display
return;
m_beginSubsequenceIndex = m_paintController.newDisplayItemList().size();
- m_paintController.createAndAppend<BeginSubsequenceDisplayItem>(m_client, type);
+ m_paintController.createAndAppend<BeginSubsequenceDisplayItem>(m_client);
}
SubsequenceRecorder::~SubsequenceRecorder()
@@ -70,7 +69,7 @@ SubsequenceRecorder::~SubsequenceRecorder()
}
}
- m_paintController.createAndAppend<EndSubsequenceDisplayItem>(m_client, DisplayItem::subsequenceTypeToEndSubsequenceType(m_type));
+ m_paintController.createAndAppend<EndSubsequenceDisplayItem>(m_client);
}
void SubsequenceRecorder::setUncacheable()
@@ -81,7 +80,7 @@ void SubsequenceRecorder::setUncacheable()
if (m_paintController.displayItemConstructionIsDisabled())
return;
- ASSERT(m_paintController.newDisplayItemList()[m_beginSubsequenceIndex].isSubsequence());
+ ASSERT(m_paintController.newDisplayItemList()[m_beginSubsequenceIndex].type() == DisplayItem::Subsequence);
m_paintController.newDisplayItemList()[m_beginSubsequenceIndex].setSkippedCache();
}

Powered by Google App Engine
This is Rietveld 408576698