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 5cac5ab8103ea422ed68029ab54cba5e61453582..0b991a0f1a9d607a2138e4eb964405306ab9d636 100644 |
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintController.cpp |
@@ -16,6 +16,13 @@ |
#endif |
namespace blink { |
+ |
+static PaintChunker::ItemBehavior behaviorOfItemType(DisplayItem::Type type) |
+{ |
+ if (DisplayItem::isForeignLayerType(type)) |
+ return PaintChunker::RequiresSeparateChunk; |
+ return PaintChunker::DefaultBehavior; |
+} |
const PaintArtifact& PaintController::paintArtifact() const |
{ |
@@ -158,7 +165,7 @@ |
DCHECK(!m_constructionDisabled); |
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
- if (!isSkippingCache()) { |
+ if (!skippingCache()) { |
if (displayItem.isCacheable()) { |
// Mark the client shouldKeepAlive under this PaintController. |
// The status will end after the new display items are committed. |
@@ -189,7 +196,7 @@ |
} |
#endif |
- if (isSkippingCache()) |
+ if (skippingCache()) |
displayItem.setSkippedCache(); |
#if DCHECK_IS_ON() |
@@ -209,12 +216,12 @@ |
#endif // DCHECK_IS_ON() |
if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
- m_newPaintChunks.incrementDisplayItemIndex(displayItem); |
-} |
- |
-void PaintController::updateCurrentPaintChunkProperties(const PaintChunk::Id* id, const PaintChunkProperties& newProperties) |
-{ |
- m_newPaintChunks.updateCurrentPaintChunkProperties(id, newProperties); |
+ m_newPaintChunks.incrementDisplayItemIndex(behaviorOfItemType(displayItem.getType())); |
+} |
+ |
+void PaintController::updateCurrentPaintChunkProperties(const PaintChunkProperties& newProperties) |
+{ |
+ m_newPaintChunks.updateCurrentPaintChunkProperties(newProperties); |
} |
const PaintChunkProperties& PaintController::currentPaintChunkProperties() const |
@@ -235,7 +242,7 @@ |
#if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
CHECK(client.isAlive()); |
#endif |
- if (isSkippingCache()) |
+ if (skippingCache()) |
return false; |
return client.displayItemsAreCached(m_currentCacheGeneration); |
} |
@@ -403,7 +410,7 @@ |
m_numCachedNewItems = 0; |
// These data structures are used during painting only. |
- DCHECK(!isSkippingCache()); |
+ DCHECK(!skippingCache()); |
#if DCHECK_IS_ON() |
m_newDisplayItemIndicesByClient.clear(); |
#endif |