| Index: ui/gfx/color_space.h
|
| diff --git a/ui/gfx/color_space.h b/ui/gfx/color_space.h
|
| index df90dabaff1d773ee594d960b5d246bd692c0487..cc9cd33adfe15f96ee111b4a1688f8496f65b94c 100644
|
| --- a/ui/gfx/color_space.h
|
| +++ b/ui/gfx/color_space.h
|
| @@ -150,6 +150,8 @@ class GFX_EXPORT ColorSpace {
|
| static MatrixID MatrixIDFromInt(int matrix_id);
|
|
|
| static ColorSpace CreateSRGB();
|
| + static ColorSpace CreateCustom(const SkMatrix44& to_XYZD50,
|
| + const SkColorSpaceTransferFn& fn);
|
| // scRGB is like RGB, but linear and values outside of 0-1 are allowed.
|
| // scRGB is normally used with fp16 textures.
|
| static ColorSpace CreateSCRGBLinear();
|
| @@ -170,14 +172,22 @@ class GFX_EXPORT ColorSpace {
|
| const sk_sp<SkColorSpace>& ToSkColorSpace() const { return sk_color_space_; }
|
| static ColorSpace FromSkColorSpace(const sk_sp<SkColorSpace>& sk_color_space);
|
|
|
| + bool GetPrimaryMatrix(SkMatrix44* to_XYZD50) const;
|
| + bool GetTransferFunction(SkColorSpaceTransferFn* fn) const;
|
| +
|
| private:
|
| PrimaryID primaries_ = PrimaryID::UNSPECIFIED;
|
| TransferID transfer_ = TransferID::UNSPECIFIED;
|
| MatrixID matrix_ = MatrixID::UNSPECIFIED;
|
| RangeID range_ = RangeID::LIMITED;
|
|
|
| - // Only used if primaries_ == PrimaryID::CUSTOM
|
| - float custom_primary_matrix_[12];
|
| + // Only used if primaries_ is PrimaryID::CUSTOM.
|
| + float custom_primary_matrix_[9];
|
| +
|
| + // Only used if transfer_ is TransferID::CUSTOM. This array consists of the A
|
| + // through G entries of the SkColorSpaceTransferFn structure in alphabetical
|
| + // order.
|
| + float custom_transfer_params_[7];
|
|
|
| // This is used to look up the ICCProfile from which this ColorSpace was
|
| // created, if possible.
|
|
|