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

Unified Diff: Source/platform/graphics/paint/DisplayItemList.cpp

Issue 1324763002: Paint invalidation tests for slimming paint v2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Yet another unrelated file mixed from another branch :( Created 5 years, 4 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: Source/platform/graphics/paint/DisplayItemList.cpp
diff --git a/Source/platform/graphics/paint/DisplayItemList.cpp b/Source/platform/graphics/paint/DisplayItemList.cpp
index deb4b52840e4d7c1ab8bdfb835978cd4fb69692a..49e12ea2cd432371e3a05b6557abd0a37dcbf2af 100644
--- a/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -6,7 +6,6 @@
#include "platform/graphics/paint/DisplayItemList.h"
#include "platform/NotImplemented.h"
-#include "platform/RuntimeEnabledFeatures.h"
#include "platform/TraceEvent.h"
#include "platform/graphics/paint/DrawingDisplayItem.h"
@@ -112,7 +111,15 @@ void DisplayItemList::endScope()
endSkippingCache();
}
-void DisplayItemList::invalidate(DisplayItemClient client)
+void DisplayItemList::invalidate(const DisplayItemClientWrapper& client)
+{
+ invalidateUntracked(client.displayItemClient());
+
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && m_trackedPaintInvalidationObjects)
+ m_trackedPaintInvalidationObjects->append(client.debugName());
+}
+
+void DisplayItemList::invalidateUntracked(DisplayItemClient client)
{
ASSERT(RuntimeEnabledFeatures::slimmingPaintEnabled());
// Can only be called during layout/paintInvalidation, not during painting.
@@ -129,6 +136,9 @@ void DisplayItemList::invalidateAll()
m_currentDisplayItems.clear();
m_validlyCachedClients.clear();
m_validlyCachedClientsDirty = false;
+
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && m_trackedPaintInvalidationObjects)
+ m_trackedPaintInvalidationObjects->append("##ALL##");
}
bool DisplayItemList::clientCacheIsValid(DisplayItemClient client) const
« no previous file with comments | « Source/platform/graphics/paint/DisplayItemList.h ('k') | Source/platform/graphics/paint/DisplayItemListTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698