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

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: Rebase 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..df91a3127d61e5b6501d0de1c15034085acce42f 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::create(m_displayItemClient, m_displayItemType);
+ else
+ displayItem = DrawingDisplayItem::create(m_displayItemClient, m_displayItemType, picture);
}
#ifndef NDEBUG
« no previous file with comments | « Source/platform/graphics/paint/DrawingDisplayItem.h ('k') | Source/platform/graphics/paint/FilterDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698