aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkSerialProcs.h
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 /include/core/SkSerialProcs.h
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 'include/core/SkSerialProcs.h')
-rw-r--r--include/core/SkSerialProcs.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/core/SkSerialProcs.h b/include/core/SkSerialProcs.h
index d55d1a8405..e1f4c61455 100644
--- a/include/core/SkSerialProcs.h
+++ b/include/core/SkSerialProcs.h
@@ -13,16 +13,14 @@
#include "SkTypeface.h"
/**
- * A serial-proc is asked to serialize the specified object (e.g. picture or image), by writing
- * its serialized form into the specified stream. If the proc does this, it returns true.
- *
- * If the proc chooses to have Skia perform its default action, it ignores the stream parameter
- * and just returns false.
+ * A serial-proc is asked to serialize the specified object (e.g. picture or image).
+ * If a data object is returned, it will be used (even if it is zero-length).
+ * If null is returned, then Skia will take its default action.
*/
-typedef bool (*SkSerialPictureProc)(SkPicture*, SkWStream*, void* ctx);
-typedef bool (*SkSerialImageProc)(SkImage*, SkWStream*, void* ctx);
-typedef bool (*SkSerialTypefaceProc)(SkTypeface*, SkWStream*, void* ctx);
+typedef sk_sp<SkData> (*SkSerialPictureProc)(SkPicture*, void* ctx);
+typedef sk_sp<SkData> (*SkSerialImageProc)(SkImage*, void* ctx);
+typedef sk_sp<SkData> (*SkSerialTypefaceProc)(SkTypeface*, void* ctx);
/**
* A deserial-proc is given the serialized form previously returned by the corresponding