diff options
author | halcanary <halcanary@google.com> | 2016-03-08 12:38:22 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-08 12:38:22 -0800 |
commit | 9904c9212074279380e21f96575078734dbbd308 (patch) | |
tree | 8970a1405170db6036b11ec1797e21cf33d5ce4b /src/pdf/SkPDFUtils.h | |
parent | 6b5c5cc7b7bdffb4882706b915b544aba8714961 (diff) |
SkPDF: Add sk_sp setters; .release() becomes std::move()
Note to reviewers: Start with changes to SkPDFTypes.h
Many places that had a bare pointer owning a reference are refactored to
use a sk_sp.
There remain several places where a non-owning pointer `T*` should be
replaced with `const sk_sp<T>&` to eliminate the common pattern
`sk_sp<T>(SkRef(x))`.
Review URL: https://codereview.chromium.org/1775043002
Diffstat (limited to 'src/pdf/SkPDFUtils.h')
-rw-r--r-- | src/pdf/SkPDFUtils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pdf/SkPDFUtils.h b/src/pdf/SkPDFUtils.h index 814d77193c..0dec80077c 100644 --- a/src/pdf/SkPDFUtils.h +++ b/src/pdf/SkPDFUtils.h @@ -35,8 +35,8 @@ class SkWStream; class SkPDFUtils { public: - static SkPDFArray* RectToArray(const SkRect& rect); - static SkPDFArray* MatrixToArray(const SkMatrix& matrix); + static sk_sp<SkPDFArray> RectToArray(const SkRect& rect); + static sk_sp<SkPDFArray> MatrixToArray(const SkMatrix& matrix); static void AppendTransform(const SkMatrix& matrix, SkWStream* content); static void MoveTo(SkScalar x, SkScalar y, SkWStream* content); |