Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: src/core/SkPixmap.cpp

Issue 1958633003: Fix for Sk4f Ubuntu compile warning (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixmap.cpp
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp
index a5e474b6d4d8c0ec4658c82b00af005bfabb7b58..bd551ed9d3dd09a2a2c51ddc05cbbdb31c4b9b1f 100644
--- a/src/core/SkPixmap.cpp
+++ b/src/core/SkPixmap.cpp
@@ -226,7 +226,7 @@ bool SkPixmap::erase(const SkColor4f& origColor, const SkIRect* subset) const {
if (kRGBA_F16_SkColorType != pm.colorType()) {
Sk4f c4 = Sk4f::Load(color.vec());
SkColor c;
- (c4 * Sk4f(255) + Sk4f(0.5f)).store(&c);
+ SkNx_cast<uint8_t>(c4 * Sk4f(255) + Sk4f(0.5f)).store(&c);
return pm.erase(c);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698