SkColorSpaceXformer: Add SkShader::makeColorSpace()
Just a refactor - reimplements the shader xforms with makeColorSpace().
11 gms have diffs. Some are down to floating precision. The old
implementation would go float->fixed->float in some cases. Others
are due to improvements with gradient shaders inside local matrix
shaders.
Bug: skia:6516
Change-Id: I424406990c5c58a47833cf4c9ef146cd3ea6c37e
Reviewed-on: https://skia-review.googlesource.com/13769
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
diff --git a/src/effects/gradients/SkLinearGradient.h b/src/effects/gradients/SkLinearGradient.h
index 4118dee..f860568 100644
--- a/src/effects/gradients/SkLinearGradient.h
+++ b/src/effects/gradients/SkLinearGradient.h
@@ -71,6 +71,8 @@
bool onAppendStages(SkRasterPipeline*, SkColorSpace*, SkArenaAlloc*,
const SkMatrix&, const SkPaint&, const SkMatrix*) const override;
+ sk_sp<SkShader> onMakeColorSpace(SkColorSpaceXformer* xformer) const override;
+
private:
class LinearGradient4fContext;