Remove dead gradient perspective code
The cool bit here is that Sk4fLinearGradient is now always fast, and never calls the slow
base-class impl. This means we can rip out Sk4fGradientBase::{mapTs, shadeSpan4f, etc}.
Change-Id: Id3788bc810873b2a209f66efa4187c84b3397e2f
Reviewed-on: https://skia-review.googlesource.com/22366
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/src/shaders/gradients/Sk4fGradientBase.h b/src/shaders/gradients/Sk4fGradientBase.h
index acba642..629b065 100644
--- a/src/shaders/gradients/Sk4fGradientBase.h
+++ b/src/shaders/gradients/Sk4fGradientBase.h
@@ -60,18 +60,14 @@
uint32_t getFlags() const override { return fFlags; }
- void shadeSpan(int x, int y, SkPMColor dst[], int count) override;
- void shadeSpan4f(int x, int y, SkPM4f dst[], int count) override;
+ void shadeSpan(int x, int y, SkPMColor dst[], int count) final;
bool isValid() const;
protected:
- virtual void mapTs(int x, int y, SkScalar ts[], int count) const = 0;
-
Sk4fGradientIntervalBuffer fIntervals;
SkMatrix fDstToPos;
SkMatrix::MapXYProc fDstToPosProc;
- uint8_t fDstToPosClass;
uint8_t fFlags;
bool fColorsArePremul;
@@ -80,15 +76,6 @@
void addMirrorIntervals(const SkGradientShaderBase&,
const Sk4f& componentScale, bool reverse);
-
- template<ApplyPremul, SkShader::TileMode tileMode>
- class TSampler;
-
- template <ApplyPremul premul>
- void shadePremulSpan(int x, int y, SkPM4f[], int count) const;
-
- template <ApplyPremul premul, SkShader::TileMode tileMode>
- void shadeSpanInternal(int x, int y, SkPM4f[], int count) const;
};
#endif // Sk4fGradientBase_DEFINED