Index: Source/platform/graphics/paint/DisplayItemList.cpp |
diff --git a/Source/platform/graphics/paint/DisplayItemList.cpp b/Source/platform/graphics/paint/DisplayItemList.cpp |
index d54146d98dbdfa01912190385d958460d06395a7..9a0828a8217379159f449d32377de6213188a533 100644 |
--- a/Source/platform/graphics/paint/DisplayItemList.cpp |
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp |
@@ -458,13 +458,14 @@ void DisplayItemList::updateValidlyCachedClientsIfNeeded() const |
m_validlyCachedClients.clear(); |
m_validlyCachedClientsDirty = false; |
- DisplayItemClient lastClient = nullptr; |
+ DisplayItemClient lastAddedClient = nullptr; |
for (const DisplayItem& displayItem : m_currentDisplayItems) { |
- if (displayItem.client() == lastClient) |
+ if (displayItem.client() == lastAddedClient) |
continue; |
- lastClient = displayItem.client(); |
- if (!displayItem.skippedCache()) |
- m_validlyCachedClients.add(lastClient); |
+ if (displayItem.isCacheable()) { |
+ lastAddedClient = displayItem.client(); |
+ m_validlyCachedClients.add(lastAddedClient); |
+ } |
} |
} |