aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2018-05-10 11:29:15 -0400
committerGravatar Mike Klein <mtklein@chromium.org>2018-05-10 18:26:22 +0000
commitce4cf72e3487f661e53f6d0c3416c9b58da4fd00 (patch)
tree5e8a5b884c787a095ea25ea93070569731e937a1 /include
parent024615e9752d93c842ad3cad597fd65382ddb678 (diff)
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 <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkColorSpace.h3
-rw-r--r--include/private/SkImageInfoPriv.h5
2 files changed, 3 insertions, 5 deletions
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<SkColorSpace> 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;
}