Index: src/core/SkDraw.cpp |
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp |
index b041df8f7a64ba74c3f1520eeabcd51354042853..131c2d7cee77f849ce4549efbadd573a2571a5fd 100644 |
--- a/src/core/SkDraw.cpp |
+++ b/src/core/SkDraw.cpp |
@@ -1762,7 +1762,7 @@ bool SkTriColorShader::TriColorShaderContext::setup(const SkPoint pts[], const S |
#include "SkComposeShader.h" |
static int ScalarTo256(SkScalar v) { |
- return static_cast<int>(SkScalarPin(v, 0, 1) * 256); |
+ return static_cast<int>(SkScalarPin(v, 0, 1) * 256 + 0.5); |
} |