aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkColorSpace_Base.h
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-12-12 14:09:31 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-12 19:34:29 +0000
commit36703d9d368050a20764b5336534bd718fd00a6e (patch)
treec452daef0a4d61f6550741cf79d2ee4c755750c2 /src/core/SkColorSpace_Base.h
parent09757b29feeb1e7a4bc73dcf07c960e06f20cd66 (diff)
Push much of the SkColorSpace_Base interface up to SkColorSpace
Some pieces still remain, but the next step looks less mechanical, so I wanted to land this piece independently. Bug: skia: Change-Id: Ie63afcfa08af2f6e4996911fa2225c43441dbfb2 Reviewed-on: https://skia-review.googlesource.com/84120 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core/SkColorSpace_Base.h')
-rw-r--r--src/core/SkColorSpace_Base.h58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/core/SkColorSpace_Base.h b/src/core/SkColorSpace_Base.h
index 083c3ebccd..c59a827a96 100644
--- a/src/core/SkColorSpace_Base.h
+++ b/src/core/SkColorSpace_Base.h
@@ -14,13 +14,6 @@
#include "SkOnce.h"
#include "SkTemplates.h"
-enum SkGammaNamed : uint8_t {
- kLinear_SkGammaNamed,
- kSRGB_SkGammaNamed,
- k2Dot2Curve_SkGammaNamed,
- kNonStandard_SkGammaNamed,
-};
-
struct SkGammas : SkRefCnt {
// There are four possible representations for gamma curves. kNone_Type is used
@@ -139,57 +132,6 @@ struct SkGammas : SkRefCnt {
class SkColorSpace_Base : public SkColorSpace {
public:
- /**
- * Describes color space gamut as a transformation to XYZ D50.
- * Returns nullptr if color gamut cannot be described in terms of XYZ D50.
- */
- virtual const SkMatrix44* toXYZD50() const = 0;
-
- /**
- * Returns a hash of the gamut transofmration to XYZ D50. Allows for fast equality checking
- * of gamuts, at the (very small) risk of collision.
- * Returns 0 if color gamut cannot be described in terms of XYZ D50.
- */
- virtual uint32_t toXYZD50Hash() const = 0;
-
- /**
- * Describes color space gamut as a transformation from XYZ D50
- * Returns nullptr if color gamut cannot be described in terms of XYZ D50.
- */
- virtual const SkMatrix44* fromXYZD50() const = 0;
-
- virtual bool onGammaCloseToSRGB() const = 0;
-
- virtual bool onGammaIsLinear() const = 0;
-
- virtual bool onIsNumericalTransferFn(SkColorSpaceTransferFn* coeffs) const = 0;
-
- virtual bool onIsCMYK() const { return false; }
-
- /**
- * Returns a color space with the same gamut as this one, but with a linear gamma.
- * For color spaces whose gamut can not be described in terms of XYZ D50, returns
- * linear sRGB.
- */
- virtual sk_sp<SkColorSpace> makeLinearGamma() const = 0;
-
- /**
- * Returns a color space with the same gamut as this one, with with the sRGB transfer
- * function. For color spaces whose gamut can not be described in terms of XYZ D50, returns
- * sRGB.
- */
- virtual sk_sp<SkColorSpace> makeSRGBGamma() const = 0;
-
- /**
- * Returns a color space with the same transfer function as this one, but with the primary
- * colors rotated. For any XYZ space, this produces a new color space that maps RGB to GBR
- * (when applied to a source), and maps RGB to BRG (when applied to a destination). For other
- * types of color spaces, returns nullptr.
- *
- * This is used for testing, to construct color spaces that have severe and testable behavior.
- */
- virtual sk_sp<SkColorSpace> makeColorSpin() const { return nullptr; }
-
enum class Type : uint8_t {
kXYZ,
kA2B