diff options
author | Ben Wagner <bungeman@google.com> | 2018-07-10 16:26:34 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-10 21:33:25 +0000 |
commit | 02ca49fc466bc54831c3a8f03b1b3c6ab6bba498 (patch) | |
tree | 39a8d5d4209b89d61bbc1fcca77b631c27fea536 /src/core/SkPictureData.cpp | |
parent | 351f4daca4f36edc5b8622a5ab646e7c509e6751 (diff) |
Move SkWriteBuffer to smart pointers.
The fields fFactorySet and fTFSet and their setting member functions are
changed to use smart pointers instead of manually handling the reference
counting.
Change-Id: I7d8e9f3dff5a7b4770959c5cc143a3ac7289d108
Reviewed-on: https://skia-review.googlesource.com/140348
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkPictureData.cpp')
-rw-r--r-- | src/core/SkPictureData.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp index 7699cdab20..92234f9ce9 100644 --- a/src/core/SkPictureData.cpp +++ b/src/core/SkPictureData.cpp @@ -189,9 +189,9 @@ void SkPictureData::serialize(SkWStream* stream, const SkSerialProcs& procs, // factories and typefaces by first serializing to an in-memory write buffer. SkFactorySet factSet; // buffer refs factSet, so factSet must come first. SkBinaryWriteBuffer buffer; - buffer.setFactoryRecorder(&factSet); + buffer.setFactoryRecorder(sk_ref_sp(&factSet)); buffer.setSerialProcs(procs); - buffer.setTypefaceRecorder(typefaceSet); + buffer.setTypefaceRecorder(sk_ref_sp(typefaceSet)); this->flattenToBuffer(buffer); // Dummy serialize our sub-pictures for the side effect of filling |