| Index: ui/gfx/color_space.h
|
| diff --git a/ui/gfx/color_space.h b/ui/gfx/color_space.h
|
| index fbbb78690df39aa52a701190369f4ae979912155..3e6786436579c939477390455f81f6f7afb8a650 100644
|
| --- a/ui/gfx/color_space.h
|
| +++ b/ui/gfx/color_space.h
|
| @@ -50,6 +50,7 @@ class GFX_EXPORT ColorSpace {
|
| // Chrome-specific values start at 1000.
|
| UNKNOWN = 1000,
|
| XYZ_D50,
|
| + ADOBE_RGB,
|
| CUSTOM,
|
| LAST = CUSTOM
|
| };
|
| @@ -140,6 +141,8 @@ class GFX_EXPORT ColorSpace {
|
|
|
| ColorSpace();
|
| ColorSpace(PrimaryID primaries,
|
| + TransferID transfer);
|
| + ColorSpace(PrimaryID primaries,
|
| TransferID transfer,
|
| MatrixID matrix,
|
| RangeID full_range);
|
| @@ -151,6 +154,9 @@ class GFX_EXPORT ColorSpace {
|
| static TransferID TransferIDFromInt(int transfer_id);
|
| static MatrixID MatrixIDFromInt(int matrix_id);
|
|
|
| + // Returns true if this is not the default-constructor object.
|
| + bool IsValid() const;
|
| +
|
| static ColorSpace CreateSRGB();
|
| static ColorSpace CreateCustom(const SkMatrix44& to_XYZD50,
|
| const SkColorSpaceTransferFn& fn);
|
| @@ -170,9 +176,9 @@ class GFX_EXPORT ColorSpace {
|
|
|
| bool IsHDR() const;
|
|
|
| - // Note that this may return nullptr.
|
| + // This will return nullptr for non-RGB spaces, spaces with non-FULL
|
| + // range, and unspecified spaces.
|
| sk_sp<SkColorSpace> ToSkColorSpace() const;
|
| - static ColorSpace FromSkColorSpace(const sk_sp<SkColorSpace>& sk_color_space);
|
|
|
| void GetPrimaryMatrix(SkMatrix44* to_XYZD50) const;
|
| bool GetTransferFunction(SkColorSpaceTransferFn* fn) const;
|
|
|