Index: src/effects/gradients/Sk4fLinearGradient.h |
diff --git a/src/effects/gradients/Sk4fLinearGradient.h b/src/effects/gradients/Sk4fLinearGradient.h |
index a0a09caf5cde500541ee7c3e9891bf25084b14b8..67449fc7e98849e454e40048b19e4e5a3bc05ddb 100644 |
--- a/src/effects/gradients/Sk4fLinearGradient.h |
+++ b/src/effects/gradients/Sk4fLinearGradient.h |
@@ -12,19 +12,19 @@ |
#include "SkLinearGradient.h" |
class SkLinearGradient:: |
-LinearGradient4fContext : public GradientShaderBase4fContext { |
+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; |
+protected: |
+ void mapTs(int x, int y, SkScalar ts[], int count) const override; |
+ |
private: |
using INHERITED = GradientShaderBase4fContext; |
- void addMirrorIntervals(const SkLinearGradient&, const Sk4f& componentScale, |
- bool dx_is_pos); |
- |
template<typename DstType, TileMode> |
class LinearIntervalProcessor; |
@@ -32,13 +32,12 @@ private: |
void shadePremulSpan(int x, int y, DstType[], int count) const; |
template <typename DstType, bool premul, SkShader::TileMode tileMode> |
- void shadePremulTileSpan(int x, int y, DstType[], int count) const; |
- |
- template <typename DstType, bool premul, SkShader::TileMode tileMode> |
void shadeSpanInternal(int x, int y, DstType[], int count) const; |
const Interval* findInterval(SkScalar fx) const; |
+ bool isFast() const { return fDstToPosClass == kLinear_MatrixClass; } |
+ |
mutable const Interval* fCachedInterval; |
}; |