skia2/include/codec
Leon Scroggins III e643a9ef52 SkCodec: Always use 0 for filling
This is a behavior change and a simplification.

When an image is incomplete or subset, we fill the remaining/all rows
with the fill color. A virtual method chose the fill color. Here were
the implementations:
- SkGifCodec:
Use transparent. This was changed previously to match Chromium.
- SkPngCodec/SkBmpStandardCodec:
Use the first color in the color table. This made sense when we had to
support kIndex_8, when we had to use an index from the color table.
Using that color for other types ensured that the image looked the same
in e.g. kN32 as kIndex_8. Removing this arbitrary choice simplifies the
code and moves the behavior toward Chromium's.
- SkCodec (default):
Use black for opaque images and transparent for images with alpha. A
theoretical advantage to this decision was that an incomplete image
would look the same in k565 and kN32. I don't think this is a good
enough reason to behave differently from Chromium.

Consolidate them all to just use 0. This results in transparent where
that is something we can specify. For 565 and Gray, this results in
black.

Only change to include headers is the removal of protected methods.
TBR=hcm@google.com

Change-Id: I9a7224b4e91b5c4988f3a87381653e99e40e10a5
Reviewed-on: https://skia-review.googlesource.com/145378
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-08-13 16:56:19 +00:00
..
SkAndroidCodec.h Make SkAndroidCodec (optionally) respect origin 2018-01-26 22:13:34 +00:00
SkCodec.h SkCodec: Always use 0 for filling 2018-08-13 16:56:19 +00:00
SkCodecAnimation.h Make SkCodec more flexible about its required frame 2017-06-07 20:15:17 +00:00
SkEncodedOrigin.h Move SkCodec::Origin into its own file 2017-10-18 19:08:16 +00:00