Skip to content
Commit 949c6006 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Make bitmap compression retain the ColorSpace

Bug: 147877556
Test: I72b5f28903a67445bc205cdad8848384ad675b31

In Bitmap#compress and AndroidBitmap_compress, remove the conversion
from F16 to 8888 P3. This was originally done because F16 forced a
particular ColorSpace, and we wanted to use a wider gamut than SRGB.
Now that F16 can be any RGB ColorSpace, encode it with the ColorSpace
that it already has. Skip the conversion to 8888, which is unnecessary.
The encoders can already convert from F16.

Remove Bitmap::CompressResult. Now that compress does not allocate a
Bitmap, there is no reason to return ALLOCATION_FAILED.

Change-Id: I8190664398e762daf57092d919f382a56267dd07
parent 6e62dbb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment