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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.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/DrawingRecorder.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
index d75455fe88b177c245b30a98c302bae04c29755f..688df8e0e224a13fc2ce7ead4d4bc971fd57046b 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -7,7 +7,6 @@
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/GraphicsLayer.h"
-#include "platform/graphics/paint/CachedDisplayItem.h"
#include "platform/graphics/paint/PaintController.h"
#include "third_party/skia/include/core/SkPicture.h"
@@ -15,21 +14,7 @@ namespace blink {
bool DrawingRecorder::useCachedDrawingIfPossible(GraphicsContext& context, const DisplayItemClient& client, DisplayItem::Type type)
{
- ASSERT(DisplayItem::isDrawingType(type));
-
- if (!context.getPaintController().clientCacheIsValid(client))
- return false;
-
- context.getPaintController().createAndAppend<CachedDisplayItem>(client, DisplayItem::drawingTypeToCachedDrawingType(type));
-
-#if ENABLE(ASSERT)
- // When under-invalidation checking is enabled, we output CachedDrawing display item
- // followed by the display item containing forced painting.
- if (RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled())
- return false;
-#endif
-
- return true;
+ return context.getPaintController().useCachedDrawingIfPossible(client, type);
}
DrawingRecorder::DrawingRecorder(GraphicsContext& context, const DisplayItemClient& displayItemClient, DisplayItem::Type displayItemType, const FloatRect& floatCullRect)

Powered by Google App Engine
This is Rietveld 408576698