Index: src/opts/SkPMFloat_none.h |
diff --git a/src/opts/SkPMFloat_none.h b/src/opts/SkPMFloat_none.h |
index 19557f11de06a8df37c4dc5dba3bd68ab42f5a0f..7f03f2f53a47a869fc34976d4edea88fe7a868c6 100644 |
--- a/src/opts/SkPMFloat_none.h |
+++ b/src/opts/SkPMFloat_none.h |
@@ -18,8 +18,9 @@ inline SkPMColor SkPMFloat::trunc() const { |
} |
inline SkPMColor SkPMFloat::get() const { |
- SkASSERT(this->isValid()); |
- return SkPackARGB32(this->a()+0.5f, this->r()+0.5f, this->g()+0.5f, this->b()+0.5f); |
+ SkPMColor c = SkPackARGB32(this->a()+0.5f, this->r()+0.5f, this->g()+0.5f, this->b()+0.5f); |
+ SkPMColorAssert(c); |
+ return c; |
} |
inline SkPMColor SkPMFloat::clamped() const { |
@@ -31,7 +32,9 @@ inline SkPMColor SkPMFloat::clamped() const { |
r = r < 0 ? 0 : (r > 255 ? 255 : r); |
g = g < 0 ? 0 : (g > 255 ? 255 : g); |
b = b < 0 ? 0 : (b > 255 ? 255 : b); |
- return SkPackARGB32(a+0.5f, r+0.5f, g+0.5f, b+0.5f); |
+ SkPMColor c = SkPackARGB32(a+0.5f, r+0.5f, g+0.5f, b+0.5f); |
+ SkPMColorAssert(c); |
+ return c; |
} |
inline void SkPMFloat::From4PMColors(const SkPMColor colors[4], |