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

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

Issue 924533006: Don't remove empty display item pairs that draw content (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 5 years, 10 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/DrawingDisplayItem.cpp
diff --git a/Source/platform/graphics/paint/DrawingDisplayItem.cpp b/Source/platform/graphics/paint/DrawingDisplayItem.cpp
index 1c34bb4f89e408cba2900ba6d3380c622b325209..0c859288670aaae7e7a168ac9dab6f1551174b78 100644
--- a/Source/platform/graphics/paint/DrawingDisplayItem.cpp
+++ b/Source/platform/graphics/paint/DrawingDisplayItem.cpp
@@ -20,6 +20,11 @@ void DrawingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) co
list->appendDrawingItem(m_picture.get());
}
+bool DrawingDisplayItem::drawsContent() const
+{
+ return m_picture->approximateOpCount() > 0;
+}
+
#ifndef NDEBUG
void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringBuilder) const
{
« 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