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

Unified Diff: src/core/SkScan_Antihair.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 | « src/core/SkScan_AntiPath.cpp ('k') | src/core/SkScan_Path.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_Antihair.cpp
diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp
index b14e12bab8c8d3157ae37ec73d3b67ca2e3c2d43..8ee0ba5f98334c0be7fd52729c0bf4ce1db0c4d0 100644
--- a/src/core/SkScan_Antihair.cpp
+++ b/src/core/SkScan_Antihair.cpp
@@ -250,9 +250,9 @@ public:
};
static inline SkFixed fastfixdiv(SkFDot6 a, SkFDot6 b) {
- SkASSERT((a << 16 >> 16) == a);
+ SkASSERT((SkLeftShift(a, 16) >> 16) == a);
SkASSERT(b != 0);
- return (a << 16) / b;
+ return SkLeftShift(a, 16) / b;
}
#define SkBITCOUNT(x) (sizeof(x) << 3)
« no previous file with comments | « src/core/SkScan_AntiPath.cpp ('k') | src/core/SkScan_Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698