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()) |