aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gif/SkGifImageReader.h
diff options
context:
space:
mode:
authorGravatar Leon Scroggins III <scroggo@google.com>2017-07-14 16:32:31 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-14 21:14:06 +0000
commit588fb040b3ad410cdb10c87f9a7884b6eb825e90 (patch)
tree954314604fe306c899e5d44417cc1019a0a078f5 /third_party/gif/SkGifImageReader.h
parent0274b30feeacae0bcd12f03ae96cb4721c1393a2 (diff)
Report error on failure to create SkCodec
Update NewFromStream to report an error on failure to create an SkCodec, so that a client can distinguish between - not enough data - invalid data In Chromium, this will allow blink::ImageDecoder to call SetFailed if the stream is invalid early and we never create an SkCodec. Without this, ImageDecoder will keep trying to create an SkCodec when it receives more data. Change-Id: I4f505c56d91c982be36a828fd0f7db17b1596588 Reviewed-on: https://skia-review.googlesource.com/22642 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Chris Blume <cblume@chromium.org>
Diffstat (limited to 'third_party/gif/SkGifImageReader.h')
-rw-r--r--third_party/gif/SkGifImageReader.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/third_party/gif/SkGifImageReader.h b/third_party/gif/SkGifImageReader.h
index 49655c23df..0b89b04818 100644
--- a/third_party/gif/SkGifImageReader.h
+++ b/third_party/gif/SkGifImageReader.h
@@ -312,9 +312,7 @@ public:
// Parse incoming GIF data stream into internal data structures.
// Non-negative values are used to indicate to parse through that frame.
- // Return true if parsing has progressed or there is not enough data.
- // Return false if a fatal error is encountered.
- bool parse(SkGIFParseQuery);
+ SkCodec::Result parse(SkGIFParseQuery);
// Decode the frame indicated by frameIndex.
// frameComplete will be set to true if the frame is completely decoded.