| Index: third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
|
| index c4f087aa853f5d02c1edbc12f71591d18fe7d2d3..a2b3bfdc71e59f29336abfa0c33c114d0d0f5e6f 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
|
| @@ -14,7 +14,7 @@ DisableNullPaintPropertyChecks::DisableNullPaintPropertyChecks()
|
| : m_disabler(&gNullPaintPropertyChecksDisabled, true) {}
|
| #endif
|
|
|
| -PaintChunker::PaintChunker() {}
|
| +PaintChunker::PaintChunker() : m_nextDisplayItemBehavior(DefaultBehavior) {}
|
|
|
| PaintChunker::~PaintChunker() {}
|
|
|
| @@ -26,6 +26,13 @@ void PaintChunker::updateCurrentPaintChunkProperties(
|
| m_currentChunkId = WTF::nullopt;
|
| if (chunkId)
|
| m_currentChunkId.emplace(*chunkId);
|
| +
|
| + // TODO(chrishtr): why not just compare properties != m_currentProperties?
|
| + // It seems this would solve the "are the property tree states the same"?
|
| + if (properties.backfaceHidden != m_currentProperties.backfaceHidden ||
|
| + properties.willChangeTransform != m_currentProperties.willChangeTransform)
|
| + m_nextDisplayItemBehavior = RequiresSeparateChunk;
|
| +
|
| m_currentProperties = properties;
|
| }
|
|
|
| @@ -47,7 +54,11 @@ bool PaintChunker::incrementDisplayItemIndex(const DisplayItem& item) {
|
|
|
| ItemBehavior behavior;
|
| Optional<PaintChunk::Id> newChunkId;
|
| - if (DisplayItem::isForeignLayerType(item.getType())) {
|
| + if (m_nextDisplayItemBehavior == RequiresSeparateChunk) {
|
| + behavior = RequiresSeparateChunk;
|
| + if (!item.skippedCache() && m_currentChunkId)
|
| + newChunkId.emplace(*m_currentChunkId);
|
| + } else if (DisplayItem::isForeignLayerType(item.getType())) {
|
| behavior = RequiresSeparateChunk;
|
| // Use null chunkId if we are skipping cache, so that the chunk will not
|
| // match any old chunk and will be treated as brand new.
|
|
|