Let clientCacheIsValid count cacheable display item only

This is just a consolidation. No observed bug.

Non-cacheable display items might use different early return policy
during painting and make clientCacheIsValid true even if there is no
cached cacheable display items.

Review URL: https://codereview.chromium.org/1323253002

git-svn-id: svn://svn.chromium.org/blink/trunk@201692 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f7d891f0
...@@ -458,13 +458,14 @@ void DisplayItemList::updateValidlyCachedClientsIfNeeded() const ...@@ -458,13 +458,14 @@ void DisplayItemList::updateValidlyCachedClientsIfNeeded() const
m_validlyCachedClients.clear(); m_validlyCachedClients.clear();
m_validlyCachedClientsDirty = false; m_validlyCachedClientsDirty = false;
DisplayItemClient lastClient = nullptr; DisplayItemClient lastAddedClient = nullptr;
for (const DisplayItem& displayItem : m_currentDisplayItems) { for (const DisplayItem& displayItem : m_currentDisplayItems) {
if (displayItem.client() == lastClient) if (displayItem.client() == lastAddedClient)
continue; continue;
lastClient = displayItem.client(); if (displayItem.isCacheable()) {
if (!displayItem.skippedCache()) lastAddedClient = displayItem.client();
m_validlyCachedClients.add(lastClient); m_validlyCachedClients.add(lastAddedClient);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment