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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h

Issue 2653963002: [Experimental] Supporting OOPIF printing
Patch Set: Rename service, fix for webview, and connect to DiscardableMemoryManager Created 3 years, 9 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: third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h
index af09dc68c1d1d0b79c46a7209a0a72510b6d206b..c4513179508dd1a267252718600c3b1656396c61 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.h
@@ -11,6 +11,7 @@
#include "platform/geometry/FloatPoint.h"
#include "platform/graphics/paint/DisplayItem.h"
#include "platform/graphics/paint/PaintRecord.h"
+#include "third_party/skia/include/core/SkDrawable.h"
#include "third_party/skia/include/core/SkRefCnt.h"
namespace blink {
@@ -29,6 +30,16 @@ class PLATFORM_EXPORT DrawingDisplayItem final : public DisplayItem {
DCHECK(isDrawingType(type));
}
+ DrawingDisplayItem(const DisplayItemClient& client,
+ Type type,
+ sk_sp<const SkDrawable> drawable,
+ bool knownToBeOpaque = false)
+ : DisplayItem(client, type, sizeof(*this)),
+ m_drawable(drawable),
+ m_knownToBeOpaque(knownToBeOpaque) {
+ DCHECK(isDrawingType(type));
+ }
+
void replay(GraphicsContext&) const override;
void appendToWebDisplayItemList(const IntRect&,
WebDisplayItemList*) const override;
@@ -51,6 +62,8 @@ class PLATFORM_EXPORT DrawingDisplayItem final : public DisplayItem {
sk_sp<const PaintRecord> m_record;
+ sk_sp<const SkDrawable> m_drawable;
+
// True if there are no transparent areas. Only used for SlimmingPaintV2.
const bool m_knownToBeOpaque;
};

Powered by Google App Engine
This is Rietveld 408576698