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

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

Issue 1497873002: Make DisplayItemClient an interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 0228a6645f170dcd3eec94799132b7014f51266e..f74205e60bc55910d4ab87c51c74a629a378b342 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -14,11 +14,11 @@
namespace blink {
-bool DrawingRecorder::useCachedDrawingIfPossible(GraphicsContext& context, const DisplayItemClientWrapper& client, DisplayItem::Type type)
+bool DrawingRecorder::useCachedDrawingIfPossible(GraphicsContext& context, const DisplayItemClient& client, DisplayItem::Type type)
{
ASSERT(DisplayItem::isDrawingType(type));
- if (!context.paintController().clientCacheIsValid(client.displayItemClient()))
+ if (!context.paintController().clientCacheIsValid(client))
return false;
context.paintController().createAndAppend<CachedDisplayItem>(client, DisplayItem::drawingTypeToCachedDrawingType(type));
@@ -33,7 +33,7 @@ bool DrawingRecorder::useCachedDrawingIfPossible(GraphicsContext& context, const
return true;
}
-DrawingRecorder::DrawingRecorder(GraphicsContext& context, const DisplayItemClientWrapper& displayItemClient, DisplayItem::Type displayItemType, const FloatRect& cullRect)
+DrawingRecorder::DrawingRecorder(GraphicsContext& context, const DisplayItemClient& displayItemClient, DisplayItem::Type displayItemType, const FloatRect& cullRect)
: m_context(context)
, m_displayItemClient(displayItemClient)
, m_displayItemType(displayItemType)
@@ -46,7 +46,7 @@ DrawingRecorder::DrawingRecorder(GraphicsContext& context, const DisplayItemClie
return;
// Must check DrawingRecorder::useCachedDrawingIfPossible before creating the DrawingRecorder.
- ASSERT((RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && context.paintController().paintOffsetWasInvalidated(displayItemClient.displayItemClient()))
+ ASSERT((RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && context.paintController().paintOffsetWasInvalidated(displayItemClient))
|| RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled()
|| !useCachedDrawingIfPossible(m_context, m_displayItemClient, m_displayItemType));

Powered by Google App Engine
This is Rietveld 408576698