History log of /external/skia/src/codec/SkCodec_wbmp.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0a7e69cb9b4e3929d659891d152a2c0b59bff4e0 03-Apr-2015 scroggo <scroggo@google.com> Get rid of leaks in SkCodec::NewFromStream.

SkCodec::NewFromStream claims to delete the passed in SkStream on
failure. This allows the caller to pass an SkStream to the function
and not worry about deleting it depending on the return value.

Most of our SkCodecs did not honor this contract though. Update them
to delete the stream on failure. Further, update SkCodec::NewFromStream
to delete the stream if it did not match any subclass, and delete the
SkCodec if we decided to return NULL because it was too big.

Add a test which tests streams which represent the beginnings of
supported format types but do not contain enough data to create an
SkCodec. The interesting part of the test is when we run it on ASAN,
which will report that we leaked something without the other changes.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1058873006
/external/skia/src/codec/SkCodec_wbmp.cpp
a096d7a6d03662073f4cd46f7db5fe2cf5495c36 27-Mar-2015 halcanary <halcanary@google.com> SkCodec: add wbmp class

Review URL: https://codereview.chromium.org/1006583005
/external/skia/src/codec/SkCodec_wbmp.cpp