diff options
author | Leon Scroggins III <scroggo@google.com> | 2020-01-30 13:59:50 -0500 |
---|---|---|
committer | Leon Scroggins III <scroggo@google.com> | 2020-02-04 16:11:25 -0500 |
commit | 6eeca5c776d95067d5e796b02cf11b8a755b4efc (patch) | |
tree | 80284e6254cd16427a453df57deab2f8e353ad59 /native/android/surface_control.cpp | |
parent | a6983622520348d420a4aa6138561d350814a733 (diff) |
AImageDecoder: allow no color conversion
Bug: 135133301
Test: I5e8bdcdae6837db23c0f4ef08f931f3bebe0ce0d
Previously the default SkColorSpace for AImageDecoder was set to the
result of SkAndroidCodec::computeOutputColorSpace. If the image has a
profile that does not map to an SkColorSpace, it will return either
DISPLAY_P3 or SRGB. Using that at decode time will result in color
conversion.
Instead, default to a null SkColorSpace for such a profile, resulting in
no color conversion. If the image has no profile, default to SRGB, as
usual.
A client that wants SRGB can still request and get that, but this allows
getting the raw pixels for an advanced client that may want to do its
own conversion.
Change-Id: I489f31fef79dec11e97c8e8fb9207adb77a3d0c7
Diffstat (limited to 'native/android/surface_control.cpp')
0 files changed, 0 insertions, 0 deletions