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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.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/GraphicsContext.h
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
index 372e6fdeb3178800a65eb6dae3a268c0d03652d5..c19a612cf477a83cd8c68b83d30f428f7c51bad3 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.h
@@ -45,7 +45,6 @@
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
-#include <memory>
class SkPath;
class SkRRect;
@@ -153,6 +152,9 @@ class PLATFORM_EXPORT GraphicsContext {
bool printing() const { return m_printing; }
void setPrinting(bool printing) { m_printing = printing; }
+ int printPageNumber() { return m_printPageNumber; }
+ void setPrintPageNumber(int num) { m_printPageNumber = num; }
+
SkColorFilter* getColorFilter() const;
void setColorFilter(ColorFilter);
// ---------- End state management methods -----------------
@@ -182,6 +184,7 @@ class PLATFORM_EXPORT GraphicsContext {
void strokeRect(const FloatRect&, float lineWidth);
void drawRecord(const PaintRecord*);
+ void drawDrawable(const SkDrawable*);
void compositeRecord(sk_sp<PaintRecord>,
const FloatRect& dest,
const FloatRect& src,
@@ -292,6 +295,8 @@ class PLATFORM_EXPORT GraphicsContext {
// not necessarily non-empty), even when the context is disabled.
sk_sp<PaintRecord> endRecording();
+ sk_sp<SkDrawable> endRecordingAsDrawable();
+
void setShadow(const FloatSize& offset,
float blur,
const Color&,
@@ -448,6 +453,8 @@ class PLATFORM_EXPORT GraphicsContext {
float m_deviceScaleFactor;
+ int m_printPageNumber;
+
unsigned m_printing : 1;
unsigned m_hasMetaData : 1;
};

Powered by Google App Engine
This is Rietveld 408576698