Index: src/opts/SkPMFloat_none.h |
diff --git a/src/opts/SkPMFloat_none.h b/src/opts/SkPMFloat_none.h |
index 448b509d408e8545c4a25a01d9e30a9db0fae946..b67c8d74204af282a07b5c6519503365acad8958 100644 |
--- a/src/opts/SkPMFloat_none.h |
+++ b/src/opts/SkPMFloat_none.h |
@@ -10,7 +10,7 @@ inline void SkPMFloat::set(SkPMColor c) { |
inline SkPMColor SkPMFloat::get() const { |
SkASSERT(this->isValid()); |
- return SkPackARGB32(this->a(), this->r(), this->g(), this->b()); |
+ return SkPackARGB32(this->a()+0.5f, this->r()+0.5f, this->g()+0.5f, this->b()+0.5f); |
} |
inline SkPMColor SkPMFloat::clamped() const { |
@@ -22,5 +22,5 @@ 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, r, g, b); |
+ return SkPackARGB32(a+0.5f, r+0.5f, g+0.5f, b+0.5f); |
} |