Support wbmp that are supported by SkImageDecoder
authorscroggo <scroggo@google.com>
Mon, 30 Nov 2015 14:25:31 +0000 (06:25 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 30 Nov 2015 14:25:31 +0000 (06:25 -0800)
commitb9a1e34362c282e21d9e99edededf987a48e98de
treefc5704cca9db79c17b2a560a08019ed6c418a998
parent0e7029eaef917d314475dcc9df9df174af88de52
Support wbmp that are supported by SkImageDecoder

The wbmp version of SkImageDecoder will support decoding an image where
the second byte can be masked away with 0x9F. Prior to this CL, SkCodec
checked that the entire byte was zero. The SkCodec implementation
appears to be more correct (at least according to Wikipedia [1]), but
it also means we could regress if someone was using an image that did
not quite fit the specification.

[1] https://en.wikipedia.org/wiki/Wireless_Application_Protocol_Bitmap_Format

BUG=skia:3257

Review URL: https://codereview.chromium.org/1473673005
src/codec/SkCodec_wbmp.cpp
tests/CodexTest.cpp