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

Unified Diff: src/effects/gradients/SkGradientShaderPriv.h

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 | « src/effects/gradients/SkClampRange.h ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkGradientShaderPriv.h
diff --git a/src/effects/gradients/SkGradientShaderPriv.h b/src/effects/gradients/SkGradientShaderPriv.h
index 203f791ceb80999b7043afddad735ede30d2a636..f8a968d1a2516e54ab8d30b34e2fde5e368532fc 100644
--- a/src/effects/gradients/SkGradientShaderPriv.h
+++ b/src/effects/gradients/SkGradientShaderPriv.h
@@ -58,7 +58,7 @@ static inline SkFixed repeat_tileproc(SkFixed x) {
#endif
static inline SkFixed mirror_tileproc(SkFixed x) {
- int s = x << 15 >> 31;
+ int s = SkLeftShift(x, 15) >> 31;
return (x ^ s) & 0xFFFF;
}
« no previous file with comments | « src/effects/gradients/SkClampRange.h ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698