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

Unified Diff: src/core/SkBitmapProcState_matrixProcs.cpp

Issue 1503423003: ubsan shift fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add cast to work around win compiler Created 5 years 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 | « include/core/SkTypes.h ('k') | src/core/SkEdge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState_matrixProcs.cpp
diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp
index ee61ee8556c1dd7a398c7c316640f8b64924ec39..1c4b7b6bcf4c1b9f79834f8a7889e6ed12d6a7e9 100644
--- a/src/core/SkBitmapProcState_matrixProcs.cpp
+++ b/src/core/SkBitmapProcState_matrixProcs.cpp
@@ -178,7 +178,7 @@ static inline U16CPU fixed_repeat(SkFixed x) {
#endif
static inline U16CPU fixed_mirror(SkFixed x) {
- SkFixed s = x << 15 >> 31;
+ SkFixed s = SkLeftShift(x, 15) >> 31;
// s is FFFFFFFF if we're on an odd interval, or 0 if an even interval
return (x ^ s) & 0xFFFF;
}
« no previous file with comments | « include/core/SkTypes.h ('k') | src/core/SkEdge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698