Index: src/core/SkPixmap.cpp |
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp |
index 887fdb46e9518bdbd698862cc01739d4389cad94..77498396b018eb1c9a8c21fc9b6e7f1c2bcb7d74 100644 |
--- a/src/core/SkPixmap.cpp |
+++ b/src/core/SkPixmap.cpp |
@@ -228,10 +228,7 @@ bool SkPixmap::erase(const SkColor4f& origColor, const SkIRect* subset) const { |
const SkColor4f color = origColor.pin(); |
if (kRGBA_F16_SkColorType != pm.colorType()) { |
- Sk4f c4 = Sk4f::Load(color.vec()); |
- SkColor c; |
- SkNx_cast<uint8_t>(c4 * Sk4f(255) + Sk4f(0.5f)).store(&c); |
- return pm.erase(c); |
+ return pm.erase(color.toSkColor()); |
} |
const uint64_t half4 = color.premul().toF16(); |