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()); |