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

Unified Diff: src/pdf/SkPDFCanvas.h

Issue 1812063002: SkPDF: Add SkPDFCanvas to intercept some draw calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-03-21 (Monday) 15:44:28 EDT Created 4 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
« no previous file with comments | « gyp/pdf.gypi ('k') | src/pdf/SkPDFCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanvas.h
diff --git a/src/pdf/SkPDFCanvas.h b/src/pdf/SkPDFCanvas.h
new file mode 100644
index 0000000000000000000000000000000000000000..3a673e22b3da530d1825a5590ef964a8411eb29a
--- /dev/null
+++ b/src/pdf/SkPDFCanvas.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkPDFCanvas_DEFINED
+#define SkPDFCanvas_DEFINED
+
+#include "SkCanvas.h"
+
+class SkPDFDevice;
+
+class SkPDFCanvas : public SkCanvas {
+public:
+ SkPDFCanvas(const sk_sp<SkPDFDevice>&);
+ ~SkPDFCanvas();
+
+protected:
+ void onDrawBitmapNine(const SkBitmap&, const SkIRect&, const SkRect&,
+ const SkPaint*) override;
+
+ void onDrawImageNine(const SkImage*, const SkIRect&, const SkRect&,
+ const SkPaint*) override;
+
+ void onDrawImageRect(const SkImage*,
+ const SkRect*,
+ const SkRect&,
+ const SkPaint*,
+ SkCanvas::SrcRectConstraint) override;
+
+ void onDrawBitmapRect(const SkBitmap&,
+ const SkRect*,
+ const SkRect&,
+ const SkPaint*,
+ SkCanvas::SrcRectConstraint) override;
+};
+
+#endif // SkPDFCanvas_DEFINED
« no previous file with comments | « gyp/pdf.gypi ('k') | src/pdf/SkPDFCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698