From ce4cf72e3487f661e53f6d0c3416c9b58da4fd00 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Thu, 10 May 2018 11:29:15 -0400 Subject: non-linear blending first steps Code: - Add a non-linear blending bit and makeNonlinearBlending() to SkColorSpace - remove enough F16=linear checks to make it possible to create surfaces and encode pngs with nonlinear F16 Testing: - add "esrgb" software config to DM, run it - add "srgbnl" software config, run it - deemphasize importance of "srgb" config on bots - update unit tests to reflect relaxed F16 constraints - add a new unit test file with _really_ basic tests, and a new unit test that's not working yet Bug: skia:7942 Change-Id: I8ac042bdf9f3d791765393b68fd9256375184d83 Reviewed-on: https://skia-review.googlesource.com/127325 Reviewed-by: Brian Osman Commit-Queue: Mike Klein --- include/core/SkColorSpace.h | 3 +++ include/private/SkImageInfoPriv.h | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h index 2bc297efe0..801ccf2098 100644 --- a/include/core/SkColorSpace.h +++ b/include/core/SkColorSpace.h @@ -259,6 +259,9 @@ public: */ const SkData* profileData() const { return this->onProfileData(); } + virtual bool nonlinearBlending() const { return false; } + virtual sk_sp makeNonlinearBlending() const { return nullptr; } + private: virtual const SkMatrix44* onToXYZD50() const = 0; virtual uint32_t onToXYZD50Hash() const = 0; diff --git a/include/private/SkImageInfoPriv.h b/include/private/SkImageInfoPriv.h index 597906af29..aac1750708 100644 --- a/include/private/SkImageInfoPriv.h +++ b/include/private/SkImageInfoPriv.h @@ -115,11 +115,6 @@ static inline bool SkImageInfoIsValidCommon(const SkImageInfo& info) { return false; } - if (kRGBA_F16_SkColorType == info.colorType() && - (info.colorSpace() && (!info.colorSpace()->gammaIsLinear()))) { - return false; - } - return true; } -- cgit v1.2.3