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

Unified Diff: src/pdf/SkPDFBitmap.cpp

Issue 1771073002: SkPDF: s/SkAutoTUnref/sk_sp/g (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFCanon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFBitmap.cpp
diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp
index 66124cef3552faa0eec300e6172fc75c9d4ba85c..1e2e26aa71131feb0b883c028aee5654600687fa 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -391,7 +391,7 @@ public:
}
private:
- SkAutoTUnref<const SkImage> fImage;
+ sk_sp<const SkImage> fImage;
};
} // namespace
@@ -418,8 +418,8 @@ public:
: fImage(SkRef(image)), fSMask(smask) {}
private:
- SkAutoTUnref<const SkImage> fImage;
- const SkAutoTUnref<SkPDFObject> fSMask;
+ sk_sp<const SkImage> fImage;
+ const sk_sp<SkPDFObject> fSMask;
};
} // namespace
@@ -434,7 +434,7 @@ namespace {
class PDFJpegBitmap final : public SkPDFObject {
public:
SkISize fSize;
- SkAutoTUnref<SkData> fData;
+ sk_sp<SkData> fData;
bool fIsYUV;
PDFJpegBitmap(SkISize size, SkData* data, bool isYUV)
: fSize(size), fData(SkRef(data)), fIsYUV(isYUV) {}
@@ -470,7 +470,7 @@ void PDFJpegBitmap::emitObject(SkWStream* stream,
SkPDFObject* SkPDFCreateBitmapObject(const SkImage* image,
SkPixelSerializer* pixelSerializer) {
- SkAutoTUnref<SkData> data(image->refEncoded());
+ sk_sp<SkData> data(image->refEncoded());
SkJFIFInfo info;
if (data && SkIsJFIF(data.get(), &info) &&
(!pixelSerializer ||
« no previous file with comments | « src/doc/SkDocument_PDF.cpp ('k') | src/pdf/SkPDFCanon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698