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

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

Issue 847783003: New display item caching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: New method, supporting partial paint Created 5 years, 11 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/DrawingRecorder.cpp
diff --git a/Source/platform/graphics/paint/DrawingRecorder.cpp b/Source/platform/graphics/paint/DrawingRecorder.cpp
index 15e30d910af34e96215794ea6cef1e9d238441ea..7b590f1665656a694b6a2d4f0bff71dd45fd8dd2 100644
--- a/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -19,8 +19,10 @@ DrawingRecorder::DrawingRecorder(GraphicsContext* context, const DisplayItemClie
: m_context(context)
, m_displayItemClient(displayItemClient)
, m_displayItemType(displayItemType)
- , m_bounds(bounds)
, m_canUseCachedDrawing(false)
+#ifndef NDEBUG
+ , m_bounds(bounds)
+#endif
{
if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
return;
@@ -55,7 +57,11 @@ DrawingRecorder::~DrawingRecorder()
RefPtr<const SkPicture> picture = m_context->endRecording();
ASSERT(!picture || !picture->approximateOpCount());
#endif
+#ifdef NDEBUG
displayItem = CachedDisplayItem::create(m_displayItemClient, m_displayItemType);
+#else
+ displayItem = CachedDisplayItem::create(m_displayItemClient, m_displayItemType, m_bounds);
+#endif
} else {
RefPtr<const SkPicture> picture = m_context->endRecording();
if (!picture || !picture->approximateOpCount())

Powered by Google App Engine
This is Rietveld 408576698