Android 8.0.0 Release 49 (6560351)

RESTRICT AUTOMERGE: Fix bug decoding JCS_RGB jpeg files

Bug: 118372692
Test: I90586f1518fdc501608f28f33c6d90d145922560

Cherry-picked from

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

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.

- 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