Expose the ICC profile from SkAndroidCodec

Bug: b/135133301

This will allow the new NDK decoding API to skip any color correction
for images with profiles that do not map exactly to an SkColorSpace.

Change-Id: I893c13906898b7250ce0ae7f249fbe63bfa8d864
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267821
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
This commit is contained in:
Leon Scroggins III 2020-01-30 16:03:28 -05:00 committed by Skia Commit-Bot
parent 055f5355d5
commit 22d08b536b
2 changed files with 9 additions and 0 deletions

View File

@ -7,6 +7,8 @@ This file includes a list of high level updates for each milestone release.
Milestone 82
<Insert new notes here- top is most recent.>
* Added SkAndroidCodec::getICCProfile for reporting the native ICC profile of
an encoded image, even if it doesn't map to an SkColorSpace.
* * *

View File

@ -75,6 +75,13 @@ public:
const SkImageInfo& getInfo() const { return fInfo; }
/**
* Return the ICC profile of the encoded data.
*/
const skcms_ICCProfile* getICCProfile() const {
return fCodec->getEncodedInfo().profile();
}
/**
* Format of the encoded data.
*/