Fix typo in non-SIMD Sk4f::thenElse().
authormtklein <mtklein@chromium.org>
Tue, 14 Jul 2015 12:23:50 +0000 (05:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 14 Jul 2015 12:23:50 +0000 (05:23 -0700)
This was causing the 3 xfermodes that use floats and conditionals
to draw wrong when SKNX_NO_SIMD was defined.

BUG=skia:4051

Review URL: https://codereview.chromium.org/1229013003

src/core/SkNx.h

index dadb3ec..84f9b69 100644 (file)
@@ -141,7 +141,7 @@ public:
     bool allTrue() const { return fLo.allTrue() && fHi.allTrue(); }
     bool anyTrue() const { return fLo.anyTrue() || fHi.anyTrue(); }
     SkNf thenElse(const SkNf& t, const SkNf& e) const {
-        return SkNf(fLo.thenElse(t.fLo, t.fHi), fHi.thenElse(t.fLo, t.fHi));
+        return SkNf(fLo.thenElse(t.fLo, e.fLo), fHi.thenElse(t.fHi, e.fHi));
     }
 
 protected: