| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef Sk4fGradientBase_DEFINED | 8 #ifndef Sk4fGradientBase_DEFINED |
| 9 #define Sk4fGradientBase_DEFINED | 9 #define Sk4fGradientBase_DEFINED |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 GradientShaderBase4fContext : public SkShader::Context { | 21 GradientShaderBase4fContext : public SkShader::Context { |
| 22 public: | 22 public: |
| 23 GradientShaderBase4fContext(const SkGradientShaderBase&, | 23 GradientShaderBase4fContext(const SkGradientShaderBase&, |
| 24 const ContextRec&); | 24 const ContextRec&); |
| 25 | 25 |
| 26 uint32_t getFlags() const override { return fFlags; } | 26 uint32_t getFlags() const override { return fFlags; } |
| 27 | 27 |
| 28 void shadeSpan(int x, int y, SkPMColor dst[], int count) override; | 28 void shadeSpan(int x, int y, SkPMColor dst[], int count) override; |
| 29 void shadeSpan4f(int x, int y, SkPM4f dst[], int count) override; | 29 void shadeSpan4f(int x, int y, SkPM4f dst[], int count) override; |
| 30 | 30 |
| 31 bool isValid() const; |
| 32 |
| 31 protected: | 33 protected: |
| 32 struct Interval { | 34 struct Interval { |
| 33 Interval(const Sk4f& c0, SkScalar p0, | 35 Interval(const Sk4f& c0, SkScalar p0, |
| 34 const Sk4f& c1, SkScalar p1); | 36 const Sk4f& c1, SkScalar p1); |
| 35 | 37 |
| 36 bool isZeroRamp() const { return fZeroRamp; } | 38 bool isZeroRamp() const { return fZeroRamp; } |
| 37 | 39 |
| 38 SkPM4f fC0, fDc; | 40 SkPM4f fC0, fDc; |
| 39 SkScalar fP0, fP1; | 41 SkScalar fP0, fP1; |
| 40 bool fZeroRamp; | 42 bool fZeroRamp; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 64 template <DstType dstType, ApplyPremul premul> | 66 template <DstType dstType, ApplyPremul premul> |
| 65 void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type
[], | 67 void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type
[], |
| 66 int count) const; | 68 int count) const; |
| 67 | 69 |
| 68 template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode> | 70 template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode> |
| 69 void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Ty
pe[], | 71 void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Ty
pe[], |
| 70 int count) const; | 72 int count) const; |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 #endif // Sk4fGradientBase_DEFINED | 75 #endif // Sk4fGradientBase_DEFINED |
| OLD | NEW |