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

Unified Diff: src/core/SkEdge.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/core/SkBitmapProcState_matrixProcs.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkEdge.h
diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h
index db6f43085dadf88bd4b28cd128a2280d86935d92..c3adbf85cb2d83afe54ee31f10330960e435fb93 100644
--- a/src/core/SkEdge.h
+++ b/src/core/SkEdge.h
@@ -15,7 +15,7 @@
#include "SkMath.h"
// This correctly favors the lower-pixel when y0 is on a 1/2 pixel boundary
-#define SkEdge_Compute_DY(top, y0) ((top << 6) + 32 - (y0))
+#define SkEdge_Compute_DY(top, y0) (SkLeftShift(top, 6) + 32 - (y0))
struct SkEdge {
enum Type {
« no previous file with comments | « src/core/SkBitmapProcState_matrixProcs.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698