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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp

Issue 2107103002: Find cached display items directly during painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Still disable subsequence caching for spv2 Created 4 years, 5 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: third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
index 19648b8efe672fc0d1035c5e15861da336c850b4..faaf08e7a976b0b91fd5b57b8acf2026f911479f 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/SubsequenceRecorder.cpp
@@ -6,7 +6,6 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/paint/CachedDisplayItem.h"
#include "platform/graphics/paint/PaintController.h"
#include "platform/graphics/paint/SubsequenceDisplayItem.h"
@@ -14,26 +13,7 @@ namespace blink {
bool SubsequenceRecorder::useCachedSubsequenceIfPossible(GraphicsContext& context, const DisplayItemClient& client)
{
- if (context.getPaintController().displayItemConstructionIsDisabled() || context.getPaintController().subsequenceCachingIsDisabled())
- return false;
-
- if (!context.getPaintController().clientCacheIsValid(client))
- return false;
-
- // TODO(pdr): Implement subsequence caching for spv2 (crbug.com/596983).
- if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
- return false;
-
- context.getPaintController().createAndAppend<CachedDisplayItem>(client, DisplayItem::CachedSubsequence);
-
-#if ENABLE(ASSERT)
- // When under-invalidation checking is enabled, we output CachedSubsequence display item
- // followed by forced painting of the subsequence.
- if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled())
- return false;
-#endif
-
- return true;
+ return context.getPaintController().useCachedSubsequenceIfPossible(client);
pdr. 2016/07/12 02:19:52 Would this inline if it's in the header?
Xianzhu 2016/07/12 17:56:48 Done.
}
SubsequenceRecorder::SubsequenceRecorder(GraphicsContext& context, const DisplayItemClient& client)

Powered by Google App Engine
This is Rietveld 408576698