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

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

Issue 2116693002: PaintChunk::id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CommitOnTheWay
Patch Set: - Created 4 years, 5 months 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/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 24e041f2dfa42c8fd87ee2decc2415e96c99bd86..190273f510e4642d7248c8ab69b6fdf6e61ab9ea 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp
@@ -17,13 +17,6 @@
namespace blink {
-static PaintChunker::ItemBehavior behaviorOfItemType(DisplayItem::Type type)
-{
- if (DisplayItem::isForeignLayerType(type))
- return PaintChunker::RequiresSeparateChunk;
- return PaintChunker::DefaultBehavior;
-}
-
const PaintArtifact& PaintController::paintArtifact() const
{
DCHECK(m_newDisplayItemList.isEmpty());
@@ -140,7 +133,7 @@ void PaintController::processNewItem(DisplayItem& displayItem)
DCHECK(!m_constructionDisabled);
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
- if (!skippingCache()) {
+ if (!isSkippingCache()) {
if (displayItem.isCacheable()) {
// Mark the client shouldKeepAlive under this PaintController.
// The status will end after the new display items are committed.
@@ -171,7 +164,7 @@ void PaintController::processNewItem(DisplayItem& displayItem)
}
#endif
- if (skippingCache())
+ if (isSkippingCache())
displayItem.setSkippedCache();
#if DCHECK_IS_ON()
@@ -188,12 +181,12 @@ void PaintController::processNewItem(DisplayItem& displayItem)
#endif // DCHECK_IS_ON()
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- m_newPaintChunks.incrementDisplayItemIndex(behaviorOfItemType(displayItem.getType()));
+ m_newPaintChunks.incrementDisplayItemIndex(displayItem);
}
-void PaintController::updateCurrentPaintChunkProperties(const PaintChunkProperties& newProperties)
+void PaintController::updateCurrentPaintChunkProperties(const DisplayItem::Id* id, const PaintChunkProperties& newProperties)
{
- m_newPaintChunks.updateCurrentPaintChunkProperties(newProperties);
+ m_newPaintChunks.updateCurrentPaintChunkProperties(id, newProperties);
}
const PaintChunkProperties& PaintController::currentPaintChunkProperties() const
@@ -214,7 +207,7 @@ bool PaintController::clientCacheIsValid(const DisplayItemClient& client) const
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS
CHECK(client.isAlive());
#endif
- if (skippingCache())
+ if (isSkippingCache())
return false;
return client.displayItemsAreCached(m_currentCacheGeneration);
}
@@ -352,7 +345,7 @@ void PaintController::commitNewDisplayItems(const LayoutSize& offsetFromLayoutOb
m_numCachedNewItems = 0;
// These data structures are used during painting only.
- DCHECK(!skippingCache());
+ DCHECK(!isSkippingCache());
#if DCHECK_IS_ON()
m_newDisplayItemIndicesByClient.clear();
#endif

Powered by Google App Engine
This is Rietveld 408576698