From aa0ce825b877871f73532beb6fde6bf2f80e99dd Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Mon, 28 Aug 2017 12:50:26 -0400 Subject: Use the 4f impl for legacy/8888 linear gradients This is a partial revert of https://skia-review.googlesource.com/c/20280, adding back L32 support for 4f gradients and switching off the legacy impl. If it sticks, we should be able to completely delete the legacy gradient code. Change-Id: Iaa6d722ea4dfd8e4d959bb76eca815a30ca7098f Reviewed-on: https://skia-review.googlesource.com/31425 Reviewed-by: Herb Derby Reviewed-by: Mike Reed Commit-Queue: Florin Malita --- src/shaders/gradients/Sk4fLinearGradient.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/shaders/gradients/Sk4fLinearGradient.h') diff --git a/src/shaders/gradients/Sk4fLinearGradient.h b/src/shaders/gradients/Sk4fLinearGradient.h index 11606e1c80..27c14e0637 100644 --- a/src/shaders/gradients/Sk4fLinearGradient.h +++ b/src/shaders/gradients/Sk4fLinearGradient.h @@ -16,19 +16,20 @@ LinearGradient4fContext final : public GradientShaderBase4fContext { public: LinearGradient4fContext(const SkLinearGradient&, const ContextRec&); + void shadeSpan(int x, int y, SkPMColor dst[], int count) override; void shadeSpan4f(int x, int y, SkPM4f dst[], int count) override; private: using INHERITED = GradientShaderBase4fContext; - template + template class LinearIntervalProcessor; - template - void shadePremulSpan(int x, int y, SkPM4f[], int count) const; + template + void shadePremulSpan(int x, int y, dstType dst[], int count, float bias0, float bias1) const; - template - void shadeSpanInternal(int x, int y, SkPM4f[], int count) const; + template + void shadeSpanInternal(int x, int y, dstType dst[], int count, float bias0, float bias1) const; const Sk4fGradientInterval* findInterval(SkScalar fx) const; -- cgit v1.2.3