aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPicture.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-12-08 10:31:52 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-08 15:58:00 +0000
commit64f73764b7553148f7660e06b57d623542c63d5b (patch)
treede3a650b929eea1f43c4295ae5c3f4318b4d069c /src/core/SkPicture.cpp
parent7f5d5d2baba439a78a5a2e4f5149a17236ed84fe (diff)
return data instead of bool
Bug: skia: Change-Id: Id7c3044a2fce087703544c624c75a7756b9c62b4 Reviewed-on: https://skia-review.googlesource.com/82602 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkPicture.cpp')
-rw-r--r--src/core/SkPicture.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index e87439aad9..5442738368 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -273,14 +273,9 @@ bool SkPicture::PictureIOSecurityPrecautionsEnabled() {
//////////////////////////////////////////////////////////////////////////////////////////////////
-bool PixelSerializer_SkSerialImageProc(SkImage* img, SkWStream* stream, void* ctx) {
+sk_sp<SkData> PixelSerializer_SkSerialImageProc(SkImage* img, void* ctx) {
SkASSERT(ctx);
- sk_sp<SkData> enc = img->encodeToData(static_cast<SkPixelSerializer*>(ctx));
- if (enc) {
- stream->write(enc->data(), enc->size());
- return true;
- }
- return false;
+ return img->encodeToData(static_cast<SkPixelSerializer*>(ctx));
}
sk_sp<SkImage> ImageDeserializer_SkDeserialImageProc(const void* data, size_t length, void* ctx) {