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

Unified Diff: src/core/SkBitmapProcState_matrixProcs.cpp

Issue 1504933002: Fix up signed-integer-overflow warnings (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | src/core/SkMatrix.cpp » ('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 1870a0e50e90f896a49c3d57102d426bd628612d..a99aa78c7b4938a26acb11bea4649d2e3e1446e9 100644
--- a/src/core/SkBitmapProcState_matrixProcs.cpp
+++ b/src/core/SkBitmapProcState_matrixProcs.cpp
@@ -103,10 +103,10 @@ static SkBitmapProcState::MatrixProc ClampX_ClampY_Procs[] = {
struct RepeatTileProcs {
static unsigned X(const SkBitmapProcState&, SkFixed fx, int max) {
- return SK_USHIFT16(((fx) & 0xFFFF) * ((max) + 1));
+ return SK_USHIFT16((long)((fx) & 0xFFFF) * ((max) + 1));
mtklein 2015/12/07 17:58:16 Let's do long -> int64_t? long is funky across co
}
static unsigned Y(const SkBitmapProcState&, SkFixed fy, int max) {
- return SK_USHIFT16(((fy) & 0xFFFF) * ((max) + 1));
+ return SK_USHIFT16((long)((fy) & 0xFFFF) * ((max) + 1));
}
};
« no previous file with comments | « no previous file | src/core/SkMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698