History log of /external/skia/src/codec/SkBmpMaskCodec.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4083c97d48e8a4f88e2797d7363f141e3d42553 15-Sep-2017 Cary Clark <caryclark@skia.org> make most of SkColorPriv.h private

created new file src/core/SkColorData.h for
internal consumption. Note that many of the
functions there are unused as well.

Bug: skia: 6898
R: reed@google.com
Change-Id: I25bfd5a9c21f53558c4ca65a77eb5d322d897c6d
Reviewed-on: https://skia-review.googlesource.com/46848
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
ede7bac43fbc69b9fdf1c178890ba6353f5bb140 23-Jul-2017 Mike Reed <reed@google.com> use unique_ptr for codec factories

Will need guards for android (at least)

Bug: skia:
Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947
Reviewed-on: https://skia-review.googlesource.com/26040
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
571b30f6117eede6d64cd2b924dc1f6aaa59e70e 11-Jul-2017 Leon Scroggins <scroggo@google.com> Reland "Remove support for decoding to kIndex_8"

Original change's description:
> > Remove support for decoding to kIndex_8
> >
> > Fix up callsites, and remove tests that no longer make sense.
> >
> > Bug: skia:6828
> > Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> > Reviewed-on: https://skia-review.googlesource.com/21664
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
>
> TBR=djsollen@google.com,scroggo@google.com
>
> Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6828
> Reviewed-on: https://skia-review.googlesource.com/22120
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,scroggo@google.com

Bug: skia:6828
Change-Id: I36ff5a11c529d29e8adc95f43b8edc6fd1dbf5b8
Reviewed-on: https://skia-review.googlesource.com/22320
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
8321f7585b6aded0c35e50e9af8709b25fdce3f6 10-Jul-2017 Leon Scroggins <scroggo@google.com> Revert "Remove support for decoding to kIndex_8"

This reverts commit 742a3e298fda669006147e4a305bab8452369b1f.

Reason for revert: Breaking Android roll:
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:453:18: error: no member named 'fColorPtr' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorPtr = colorPtr;
~~~~~~~~~~~~ ^
frameworks/base/core/jni/android/graphics/BitmapFactory.cpp:454:18: error: no member named 'fColorCount' in 'SkAndroidCodec::AndroidOptions'
codecOptions.fColorCount = colorCount;
~~~~~~~~~~~~ ^

Original change's description:
> Remove support for decoding to kIndex_8
>
> Fix up callsites, and remove tests that no longer make sense.
>
> Bug: skia:6828
> Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
> Reviewed-on: https://skia-review.googlesource.com/21664
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,scroggo@google.com

Change-Id: I1bc669441f250690884e75a9a61427fdf75c6907
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6828
Reviewed-on: https://skia-review.googlesource.com/22120
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
742a3e298fda669006147e4a305bab8452369b1f 10-Jul-2017 Leon Scroggins III <scroggo@google.com> Remove support for decoding to kIndex_8

Fix up callsites, and remove tests that no longer make sense.

Bug: skia:6828
Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295
Reviewed-on: https://skia-review.googlesource.com/21664
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
c6e6a5f45e54006e861275a6d5c165830f403dcd 05-Jun-2017 Leon Scroggins III <scroggo@google.com> Simplify SkCodecs' call to SkColorSpaceXform::apply

Most SkCodec subclasses did the following to apply their
SkColorSpaceXform:
dstFormat = select_xform_format(dstInfo.colorType());
srcFormat = select_xform_format(<something that doesn't change>);
xformAlphaType = select_xform_alpha(dstInfo.alphaType(),
this->getInfo().alphaType());
this->colorXform()->apply(dstFormat, dst, srcFormat, src, width,
xformAlphaType);

Consolidate the computation of these parameters into SkCodec and add a
new method to SkCodec that calls apply() with those parameters.

Add a SkColorSpaceXform::ColorFormat to SkCodec. This allows the new
method SkCodec::applyColorXform to supply the ColorFormat.

TBR=reed@google.com
(No change to public API.)

Change-Id: I8ea7ba4c0024be827a9f9359796c778744330f6e
Reviewed-on: https://skia-review.googlesource.com/18523
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
d81fed9ce2b9c8f2f227cf74c2578b90aafbe196 01-Jun-2017 Leon Scroggins III <scroggo@google.com> Replace BMP calls to new with calls to malloc

A BMP can have an arbitrarily large width. We typically read a row
into a block of memory before swizzling it to the output. Rather
than calling new to create that block of memory, which may crash
when we run out of memory, call malloc, and return null if malloc
fails.

Add a common base class for Mask and Standard BMP codecs. This class
handles allocating and freeing the buffer.

Bug: b/37623797
Change-Id: I0510b76d688d030865faa481bb2fb1351dac2c97
Reviewed-on: https://skia-review.googlesource.com/18400
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
562e681e5c600e919c3b57201b85776c4789f5aa 08-Nov-2016 Matt Sarett <msarett@google.com> Refactor RGBA/BGRA xform logic in SkCodecs

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4554

Change-Id: Ic9105a2806b915fc56b6810a80dd444561d0d959
Reviewed-on: https://skia-review.googlesource.com/4554
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
1b96c6f91377431cd407c43fedac613fff21c2ed 03-Nov-2016 Matt Sarett <msarett@google.com> Add F16, SkColorSpaceXform support to SkBmpCodec

BUG=skia:4895

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4390

Change-Id: I9cb727e7f13816b0ac882f62ec635a4528c3a524
Reviewed-on: https://skia-review.googlesource.com/4390
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
145dbcd165d9d27298eb8888bc240e2d06a95464 03-Nov-2016 Ben Wagner <bungeman@google.com> Remove SkAutoTDelete.

Replace with std::unique_ptr.

Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176
Reviewed-on: https://skia-review.googlesource.com/4381
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/src/codec/SkBmpMaskCodec.cpp
6193568fed3983e406544a46a5e1fd292729ca84 03-Nov-2016 Matt Sarett <msarett@google.com> Revert "Add F16, SkColorSpaceXform support to SkBmpCodec"

This reverts commit d851795e7992565c1eb2b9474ee5ad01d1a01fad.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Add F16, SkColorSpaceXform support to SkBmpCodec
>
> BUG=skia:4895
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300
>
> Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
> Reviewed-on: https://skia-review.googlesource.com/4300
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Matt Sarett <msarett@google.com>
>

Speculative revert for MSAN

TBR=borenet@google.com,msarett@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ie48c03c0c3156267763fbcf96818477567c5069d
Reviewed-on: https://skia-review.googlesource.com/4378
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
d851795e7992565c1eb2b9474ee5ad01d1a01fad 02-Nov-2016 Matt Sarett <msarett@google.com> Add F16, SkColorSpaceXform support to SkBmpCodec

BUG=skia:4895

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4300

Change-Id: I2f2b8d3854ea3a8c5904dd3c5bea0342e2be9789
Reviewed-on: https://skia-review.googlesource.com/4300
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
/external/skia/src/codec/SkBmpMaskCodec.cpp
2ecc35ffa5feb56cd088478589ba1e48382b2e1f 08-Sep-2016 msarett <msarett@google.com> Checking for valid colorType, alphaType, colorSpace in SkCodec

* Refactor to share code between SkPngCodec and SkWebpCodec
* Didn't end up sharing with SkJpegCodec but did refactor
that code a bit
* Disallow conversions to F16 with non-linear color spaces
* Fail to decode if we fail to create a SkColorSpaceXform
(should be an assert soon). We used to fallback on a
legacy decode if we failed to create the transform.
* A bunch of name changes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003

Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9
Review-Url: https://codereview.chromium.org/2319293003
/external/skia/src/codec/SkBmpMaskCodec.cpp
85c922acec37726ac64e9be9a79de697c677f35d 08-Sep-2016 msarett <msarett@google.com> Revert of Checking for valid colorType, alphaType, colorSpace in SkCodec (patchset #2 id:100001 of https://codereview.chromium.org/2319293003/ )

Reason for revert:
Broken perf bots

Original issue's description:
> Checking for valid colorType, alphaType, colorSpace in SkCodec
>
> * Refactor to share code between SkPngCodec and SkWebpCodec
> * Didn't end up sharing with SkJpegCodec but did refactor
> that code a bit
> * Disallow conversions to F16 with non-linear color spaces
> * Fail to decode if we fail to create a SkColorSpaceXform
> (should be an assert soon). We used to fallback on a
> legacy decode if we failed to create the transform.
> * A bunch of name changes
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003
>
> Committed: https://skia.googlesource.com/skia/+/7a9900d6d34e437bb24beb5524a1f6488ae138c9

TBR=scroggo@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2328663002
/external/skia/src/codec/SkBmpMaskCodec.cpp
7a9900d6d34e437bb24beb5524a1f6488ae138c9 08-Sep-2016 msarett <msarett@google.com> Checking for valid colorType, alphaType, colorSpace in SkCodec

* Refactor to share code between SkPngCodec and SkWebpCodec
* Didn't end up sharing with SkJpegCodec but did refactor
that code a bit
* Disallow conversions to F16 with non-linear color spaces
* Fail to decode if we fail to create a SkColorSpaceXform
(should be an assert soon). We used to fallback on a
legacy decode if we failed to create the transform.
* A bunch of name changes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293003

Review-Url: https://codereview.chromium.org/2319293003
/external/skia/src/codec/SkBmpMaskCodec.cpp
c30c418f4eb75f365c7d7a32d5419b41ca780ba8 20-Apr-2016 msarett <msarett@google.com> Add SkEncodedInfo to report properties of encoded image data

All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.

In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.

BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820073002

Committed: https://skia.googlesource.com/skia/+/f682d9ad70d690a343bc15e26ef321d86770be41

Review URL: https://codereview.chromium.org/1820073002
/external/skia/src/codec/SkBmpMaskCodec.cpp
3c920243f831de5892857f86618fd9c4f9655ba2 19-Apr-2016 robertphillips <robertphillips@google.com> Revert of Add SkEncodedInfo to report properties of encoded image data (patchset #6 id:200001 of https://codereview.chromium.org/1820073002/ )

Reason for revert:
Lots of bots failing

Original issue's description:
> Add SkEncodedInfo to report properties of encoded image data
>
> All this does is build an SkEncodedInfo for each codec, and
> then convert it to an SkImageInfo.
>
> In future steps I intend to:
> (1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
> (2) Support more conversions in SkSwizzler (non-native
> BGRA/RGBA, 16-bit components, float, fixed point)
> (3) Investigate optimizing conversions from encoded data
> to linear color spaces.
>
> BUG=skia:4133
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820073002
>
> Committed: https://skia.googlesource.com/skia/+/f682d9ad70d690a343bc15e26ef321d86770be41

TBR=scroggo@google.com,reed@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4133

Review URL: https://codereview.chromium.org/1895383002
/external/skia/src/codec/SkBmpMaskCodec.cpp
f682d9ad70d690a343bc15e26ef321d86770be41 19-Apr-2016 msarett <msarett@google.com> Add SkEncodedInfo to report properties of encoded image data

All this does is build an SkEncodedInfo for each codec, and
then convert it to an SkImageInfo.

In future steps I intend to:
(1) Use SkEncodedInfo in place of SrcConfig in SkSwizzler.
(2) Support more conversions in SkSwizzler (non-native
BGRA/RGBA, 16-bit components, float, fixed point)
(3) Investigate optimizing conversions from encoded data
to linear color spaces.

BUG=skia:4133
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1820073002

Review URL: https://codereview.chromium.org/1820073002
/external/skia/src/codec/SkBmpMaskCodec.cpp
b30d6984e6dfc185bf1eebf927343563057a7bb3 15-Feb-2016 msarett <msarett@google.com> Fix colorType/alphaType checks in SkCodec

Make getPixels() and startScanlineDecode() behave
consistently.

Require that kGray8 decodes are opaque.

Assert that creating the swizzler succeeds.

BUG=skia:4203
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002

Committed: https://skia.googlesource.com/skia/+/c7578b6cdd03b61f076ffc7956efd952d6c301c0

Review URL: https://codereview.chromium.org/1695473002
/external/skia/src/codec/SkBmpMaskCodec.cpp
deabdb5b9712de9e3c6bbb9aa68ec2f20df80a8e 13-Feb-2016 msarett <msarett@google.com> Revert of Fix colorType/alphaType checks in SkCodec (patchset #5 id:80001 of https://codereview.chromium.org/1695473002/ )

Reason for revert:
Really bad images in Gold.

Original issue's description:
> Fix colorType/alphaType checks in SkCodec
>
> Make getPixels() and startScanlineDecode() behave
> consistently.
>
> Require that kGray8 decodes are opaque.
>
> Assert that creating the swizzler succeeds.
>
> BUG=skia:4203
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002
>
> Committed: https://skia.googlesource.com/skia/+/c7578b6cdd03b61f076ffc7956efd952d6c301c0

TBR=scroggo@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4203

Review URL: https://codereview.chromium.org/1694023002
/external/skia/src/codec/SkBmpMaskCodec.cpp
c7578b6cdd03b61f076ffc7956efd952d6c301c0 12-Feb-2016 msarett <msarett@google.com> Fix colorType/alphaType checks in SkCodec

Make getPixels() and startScanlineDecode() behave
consistently.

Require that kGray8 decodes are opaque.

Assert that creating the swizzler succeeds.

BUG=skia:4203
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002

Review URL: https://codereview.chromium.org/1695473002
/external/skia/src/codec/SkBmpMaskCodec.cpp
9b9497ef14f23562a95afe989d1efe41c603a6f6 11-Feb-2016 msarett <msarett@google.com> Implement onSkipScanlines() for bmp and wbmp

TBR=reed@google.com
BUG=skia:4270
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691083002

Review URL: https://codereview.chromium.org/1691083002
/external/skia/src/codec/SkBmpMaskCodec.cpp
f724b99435e0c7a6a95112229cc44a2ba813ecc9 15-Oct-2015 msarett <msarett@google.com> Reenable warnings in src/codec

BUG=skia:

Review URL: https://codereview.chromium.org/1400343005
/external/skia/src/codec/SkBmpMaskCodec.cpp
fdb47571a3b5e72469b67de44e32ac14d9352ab4 13-Oct-2015 msarett <msarett@google.com> Add subsetting to SkScanlineDecoder

This CL allows the SkScanlineDecoder to decode partial
scanlines.

This is a first step in efficiently implementing subsetting
in SkScaledCodec.

BUG=skia:4209

Review URL: https://codereview.chromium.org/1390213002
/external/skia/src/codec/SkBmpMaskCodec.cpp
e6dd004c1b8a81dc37a370570877b8b7d6dbe308 09-Oct-2015 msarett <msarett@google.com> Fill incomplete images in SkCodec parent class

Rather than implementing some sort of "fill" in every
SkCodec subclass for incomplete images, let's make the
parent class handle this situation.

This includes an API change to SkCodec.h

SkCodec::getScanlines() now returns the number of lines it
read successfully, rather than an SkCodec::Result enum.
getScanlines() most often fails on an incomplete input, in
which case it is useful to know how many lines were
successfully decoded - this provides more information than
kIncomplete vs kSuccess. We do lose information when the
API is used improperly, as we are no longer able to return
kInvalidParameter or kScanlineNotStarted.

Known Issues:
Does not work for incomplete fFrameIsSubset gifs.
Does not work for incomplete icos.

BUG=skia:

Review URL: https://codereview.chromium.org/1332053002
/external/skia/src/codec/SkBmpMaskCodec.cpp
3a7701c0101386ba05acdde6f911be0c2696f317 30-Sep-2015 scroggo <scroggo@google.com> Call rewindIfNeeded in SkCodec

Rather than calling it in each subclass, call it once in the base
class. Call it first, since other steps may modify internal structures
which would be replaced by a call to onRewind.

BUG=skia:4284

Review URL: https://codereview.chromium.org/1381483002
/external/skia/src/codec/SkBmpMaskCodec.cpp
46c574725676b26ada63ac15e42cda309dcd5090 30-Sep-2015 scroggo <scroggo@google.com> Merge SkCodec with SkScanlineDecoder

Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).

- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.

- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).

- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).

BUG=skia:4175
BUG=skia:4284

=====================================================================

SkScanlineDecoder.h/.cpp:
Removed.

SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.

General changes:
Convert SkScanlineDecoders to SkCodecs.

General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.

SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.

SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.

CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.

TODO: Add tests for onReallyHasAlpha.

Review URL: https://codereview.chromium.org/1365313002
/external/skia/src/codec/SkBmpMaskCodec.cpp
5406d6f39ad042e7a0a0d4ea16beca4fe2b66492 31-Aug-2015 msarett <msarett@google.com> Scanline decoding for bmp

Redesigns SkScanlineDecoder.h to indicate the ordering
in which the scanlines are provided

Refactors SkSwizzler::Fill() to include the zeroInit check
and to actually be correct.

BUG=skia:3257
BUG=skia:4198

Review URL: https://codereview.chromium.org/1287423002
/external/skia/src/codec/SkBmpMaskCodec.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/codec/SkBmpMaskCodec.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/src/codec/SkBmpMaskCodec.cpp
cc2feb161f756c4035a407296567654d86bc7be7 14-Aug-2015 scroggo <scroggo@chromium.org> Support more swizzles to 565 in SkCodec

Add more swizzling functions for swizzling to 565. Much of this
code was revived from crrev.com/1055743003 (for BMP). Also added
swizzling functions for WBMP.

Consolidate the static function conversion_possible.

In SkCodec::getPixels, check that the alphatype corresponds to the
colorType. This prevents requesting 565 + non-opaque.

In SkIcoCodec, report that the image is unpremul (instead of
whatever the largest embedded codec thinks), but modify the
requested info to have the alpha type expected/required by the
embedded codec.

Add tests for decoding to 565.

BUG=skia:3257
BUG=skia:3683

Review URL: https://codereview.chromium.org/1277213002
/external/skia/src/codec/SkBmpMaskCodec.cpp
b427db1d457a083f2652756a453fbb91bc6a7447 12-Aug-2015 scroggo <scroggo@chromium.org> Consolidate SkCodec functions for handling rewind

Previously, many of our codec implementations followed the same
pattern (often in a function named handleRewind):

switch (this->rewindIfNeeded()) {
case CouldNotRewind:
return CouldNotRewind;
case NoRewindNecessary:
// keep going
break;
case Rewound:
<re-read header etc>
break;
}

In this CL, remove the enum, and put the piece that happens in the
Rewound case into a virtual function, onRewind. rewindIfNeeded now
contains the common pieces from various functions named handleRewind.

In SkBmpCodec, add a function that returns whether the BMP is in ICO,
so it can have a common implementation for onRewind.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1288483002
/external/skia/src/codec/SkBmpMaskCodec.cpp
4ab9d5f1bc6d05c49dc765c3de5ade816f4c968e 07-Aug-2015 msarett <msarett@google.com> Split SkBmpCodec into three separate classes

Will regress behavior on gold on test32bfv4.bmp, where we
will no longer fix transparent decodes.

TODO: Start fixing transparent decodes again, or decide
that we don't want to fix them and remove isTransparent
from SkSwizzler. I think this may become more clear when I
start implementing the scanline decoder.

BUG=skia:

Review URL: https://codereview.chromium.org/1258863008
/external/skia/src/codec/SkBmpMaskCodec.cpp