diff options
author | 2016-11-12 08:06:55 -0600 | |
---|---|---|
committer | 2016-11-13 18:31:13 +0000 | |
commit | 5df4934b3e40cdc378e225d1dda39f015cae9bae (patch) | |
tree | f0871dcbca35730333ad3b14115e6a14987fac7b /src/pdf | |
parent | f982cb37e3092e7a69c13a12ec09806ceff5af45 (diff) |
Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"
Changes over original:
- conditionalize ownership in SkPictureRecorder
- conditionalize ownership in SkCanvasStateUtils
This reverts commit b613c266df48cf45296ecc23d1bd7098c84bb7ba.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4742
Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2
Reviewed-on: https://skia-review.googlesource.com/4742
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/pdf')
-rw-r--r-- | src/pdf/SkPDFDocument.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFDocument.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp index ab5f465971..92e82fc018 100644 --- a/src/pdf/SkPDFDocument.cpp +++ b/src/pdf/SkPDFDocument.cpp @@ -217,7 +217,7 @@ SkCanvas* SkPDFDocument::onBeginPage(SkScalar width, SkScalar height, SkScalarRoundToInt(width), SkScalarRoundToInt(height)); fPageDevice.reset( SkPDFDevice::Create(pageSize, fRasterDpi, this)); - fCanvas = sk_make_sp<SkPDFCanvas>(fPageDevice); + fCanvas.reset(new SkPDFCanvas(fPageDevice)); fCanvas->clipRect(trimBox); fCanvas->translate(trimBox.x(), trimBox.y()); return fCanvas.get(); diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h index b62a7a59a2..15e147961d 100644 --- a/src/pdf/SkPDFDocument.h +++ b/src/pdf/SkPDFDocument.h @@ -76,7 +76,7 @@ private: SkTHashSet<SkPDFFont*> fFonts; sk_sp<SkPDFDict> fDests; sk_sp<SkPDFDevice> fPageDevice; - sk_sp<SkCanvas> fCanvas; + std::unique_ptr<SkCanvas> fCanvas; sk_sp<SkPDFObject> fID; sk_sp<SkPDFObject> fXMP; SkScalar fRasterDpi; |