Android 8.0.0 Release 49 (6560351)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCXyhwPwAKCRDorT+BmrEO
eF7UAJ48e/X+dQRzyd7yKemyc49UgLbUbACfdy5fHTl2b/iiXZEBbbsungWck58=
=mdwc
-----END PGP SIGNATURE-----
RESTRICT AUTOMERGE: Fix bug decoding JCS_RGB jpeg files

Bug: 118372692
Test: I90586f1518fdc501608f28f33c6d90d145922560

Cherry-picked from
https://skia-review.googlesource.com/c/164619

Remove conflicting changes in infra. Resolved conflicts in:
- src/codec/SkHeifCodec.cpp
- src/codec/SkJpegCodec.cpp
- src/codec/SkSwizzler.cpp

Use old version of SkEncodedInfo::Make
Remove references to SkEncodedInfo::kXAlpha_Color and ::k565_Color
which are unused by Android.

Also include SafetyNet logging from
https://skia-review.googlesource.com/c/skia/+/171222.

Original message follows:

Bug: chromium:897031
Bug: chromium:896776

Prior to this fix, we would treat the output from such a JPEG
as if it were a 16 bit per component RGB PNG. We hit an assert
in debug, but in release mode we do the wrong thing.

Split up SkSwizzler::CreateSwizzler into two public factories
(and a private one) based on whether format conversion is desired.
Without format conversion, we may have already converted (as is
the case with this JPEG), so the SkEncodedInfo::Color is not relevant.
That flavor of the factory just needs to know the bytes per pixel,
so provide that info instead.

Add a test file to Google Storage: apron.jpg, from Chromium's
benchmark files.

Conflicts:
- src/codec/SkHeifCodec.cpp
  - Does not exist here
  - TODO: Cherry-pick separately to oc-mr1-dev
- src/codec/SkSwizzler.cpp
- src/codec/SkWbmpCodec.cpp
- src/codec/SkWbmpCodec.h
  - conflicts due to removing kIndex8 in P

Change-Id: If1a35947d48c0139d6e93e420309725b79c4163a
Merged-In: Idc55ecb1be7ba53455ca60bbca30477eb321a702
(cherry picked from commit a65763e69aed2d97ca80f8e2fc30c168f055c0c2)
10 files changed