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

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

Issue 794323004: Emit dummy display item when recorded picture is empty (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a missed "override" Created 6 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: Source/platform/graphics/paint/DrawingRecorder.cpp
diff --git a/Source/platform/graphics/paint/DrawingRecorder.cpp b/Source/platform/graphics/paint/DrawingRecorder.cpp
index 81bdef4c78d1695e12f6bd2577ba64c11e9f4c11..d5d2f61fa6fab2af397330f1ef36f0b1b8d1c8ce 100644
--- a/Source/platform/graphics/paint/DrawingRecorder.cpp
+++ b/Source/platform/graphics/paint/DrawingRecorder.cpp
@@ -64,8 +64,9 @@ DrawingRecorder::~DrawingRecorder()
} else {
RefPtr<const SkPicture> picture = m_context->endRecording();
if (!picture || !picture->approximateOpCount())
- return;
- displayItem = DrawingDisplayItem::create(m_displayItemClient, m_displayItemType, picture);
+ displayItem = DisplayItem::createDummy(m_displayItemClient, m_displayItemType);
+ else
+ displayItem = DrawingDisplayItem::create(m_displayItemClient, m_displayItemType, picture);
}
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698