Remove dependency on getLength from webp decoder.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 21 Aug 2013 14:56:09 +0000 (14:56 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 21 Aug 2013 14:56:09 +0000 (14:56 +0000)
commit3c8730a84e469cfc71866a2f8d6bfd1d2ea689e3
treee682785532351bac776a35ad158fc585c7abb7d2
parentaf9296e1e96a6ccec9630da769ef5e19456e369a
Remove dependency on getLength from webp decoder.

In webp_parse_header, continue reading until end of stream is reached,
or we have read WEBP_VP8_HEADER_SIZE bytes. Do not check to see if the
stream was too short, since it may not have a way to report its length,
and WEBP_VP8_HEADER_SIZE is padded slightly. Instead, depend on
WebPGetFeatures to report that the stream did not have enough data.

In webp_idecode, only check length if it is available.

BUG=https://b.corp.google.com/issue?id=8432093
R=djsollen@google.com, vikasa@google.com

Review URL: https://codereview.chromium.org/22841005

git-svn-id: http://skia.googlecode.com/svn/trunk@10848 2bbb7eff-a529-9590-31e7-b0007b416f81
src/images/SkImageDecoder_libwebp.cpp