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

Unified Diff: src/pdf/SkPDFDocument.cpp

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 | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDocument.cpp
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 670908e6d51199f706d26cbddee6458daed6b536..2a01b807fe479bcdac3a1d47112423f72aa99762 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -6,6 +6,7 @@
*/
#include "SkPDFCanon.h"
+#include "SkPDFCanvas.h"
#include "SkPDFDevice.h"
#include "SkPDFDocument.h"
#include "SkPDFFont.h"
@@ -333,7 +334,7 @@ protected:
SkScalarRoundToInt(width), SkScalarRoundToInt(height));
sk_sp<SkPDFDevice> device(
SkPDFDevice::Create(pageSize, fRasterDpi, &fCanon));
- fCanvas.reset(new SkCanvas(device.get()));
+ fCanvas = sk_make_sp<SkPDFCanvas>(device);
fPageDevices.push_back(std::move(device));
fCanvas->clipRect(trimBox);
fCanvas->translate(trimBox.x(), trimBox.y());
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698