e643a9ef52
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> |
||
---|---|---|
.. | ||
SkAndroidCodec.h | ||
SkCodec.h | ||
SkCodecAnimation.h | ||
SkEncodedOrigin.h |