diff options
Diffstat (limited to 'src/shaders/gradients/SkLinearGradient.h')
-rw-r--r-- | src/shaders/gradients/SkLinearGradient.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/shaders/gradients/SkLinearGradient.h b/src/shaders/gradients/SkLinearGradient.h index 64db9dcdb3..c93f2b4ed3 100644 --- a/src/shaders/gradients/SkLinearGradient.h +++ b/src/shaders/gradients/SkLinearGradient.h @@ -9,47 +9,11 @@ #define SkLinearGradient_DEFINED #include "SkGradientShaderPriv.h" -#include "SkNx.h" - -struct Sk4fStorage { - float fArray[4]; - - operator Sk4f() const { - return Sk4f::Load(fArray); - } - - Sk4fStorage& operator=(const Sk4f& src) { - src.store(fArray); - return *this; - } -}; class SkLinearGradient : public SkGradientShaderBase { public: SkLinearGradient(const SkPoint pts[2], const Descriptor&); - class LinearGradientContext : public SkGradientShaderBase::GradientShaderBaseContext { - public: - LinearGradientContext(const SkLinearGradient&, const ContextRec&); - - void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; - - struct Rec { - Sk4fStorage fColor; - float fPos; - float fPosScale; - }; - private: - SkTDArray<Rec> fRecs; - bool fApplyAlphaAfterInterp; - - void shade4_clamp(int x, int y, SkPMColor dstC[], int count); - template <bool, bool> void shade4_dx_clamp(SkPMColor dstC[], int count, float fx, float dx, - float invDx, const float dither[2]); - - typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; - }; - GradientType asAGradient(GradientInfo* info) const override; #if SK_SUPPORT_GPU std::unique_ptr<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const override; |