Index: src/effects/gradients/Sk4fGradientBase.cpp |
diff --git a/src/effects/gradients/Sk4fGradientBase.cpp b/src/effects/gradients/Sk4fGradientBase.cpp |
index bd3c51a0352cccdbce31a7afb514419b13a13644..76fb178776a5ce7c07245a113a257966fcf9aae7 100644 |
--- a/src/effects/gradients/Sk4fGradientBase.cpp |
+++ b/src/effects/gradients/Sk4fGradientBase.cpp |
@@ -28,24 +28,14 @@ Interval::Interval(SkPMColor c0, SkScalar p0, |
, fZeroRamp(c0 == c1) { |
SkASSERT(p0 != p1); |
- const Sk4f c4f0 = SkNx_cast<float>(Sk4b::Load(&c0)) * componentScale; |
- const Sk4f c4f1 = SkNx_cast<float>(Sk4b::Load(&c1)) * componentScale; |
+ const Sk4f c4f0 = SkPM4f::FromPMColor(c0).to4f() * componentScale; |
+ const Sk4f c4f1 = SkPM4f::FromPMColor(c1).to4f() * componentScale; |
const Sk4f dc4f = (c4f1 - c4f0) / (p1 - p0); |
c4f0.store(&fC0.fVec); |
dc4f.store(&fDc.fVec); |
} |
-SkGradientShaderBase::GradientShaderBase4fContext:: |
-Interval::Interval(const Sk4f& c0, const Sk4f& dc, |
- SkScalar p0, SkScalar p1) |
- : fP0(p0) |
- , fP1(p1) |
- , fZeroRamp((dc == 0).allTrue()) { |
- c0.store(fC0.fVec); |
- dc.store(fDc.fVec); |
-} |
- |
bool SkGradientShaderBase::GradientShaderBase4fContext:: |
Interval::contains(SkScalar fx) const { |
return in_range(fx, fP0, fP1); |