aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPaint.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-18 15:57:38 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-18 21:14:19 +0000
commite97e792c79afd01fe1d83e5d1e94918145794c54 (patch)
tree43dc60bf6ddffa55b0bd86a1a4a17f8819b21aca /include/core/SkPaint.h
parent9ca27849d8259e4b35243094bdca969612efba2f (diff)
validate paint setters in readbuffer
Bug: skia:7425 Change-Id: I55213bc206cf5cfb8cbf4fbe8a682efd6eae59fa Reviewed-on: https://skia-review.googlesource.com/96860 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r--include/core/SkPaint.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 94a7f407e0..f334570a00 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -177,8 +177,10 @@ public:
by the client.
@param buffer serialized data describing SkPaint content
+ @return false if the buffer contained invalid data to initialize the paint, in which case
+ the paint will be reset().
*/
- void unflatten(SkReadBuffer& buffer);
+ bool unflatten(SkReadBuffer& buffer);
/** Sets all SkPaint contents to their initial values. This is equivalent to replacing
SkPaint with the result of SkPaint().