diff options
Diffstat (limited to 'samplecode/SampleTextEffects.cpp')
-rw-r--r-- | samplecode/SampleTextEffects.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samplecode/SampleTextEffects.cpp b/samplecode/SampleTextEffects.cpp index 77a3bd795a..bd134d0d23 100644 --- a/samplecode/SampleTextEffects.cpp +++ b/samplecode/SampleTextEffects.cpp @@ -17,7 +17,7 @@ static inline SkPMColor rgb2gray(SkPMColor c) unsigned g = SkGetPackedG32(c); unsigned b = SkGetPackedB32(c); - unsigned x = r * 5 + g * 7 + b * 4 >> 4; + unsigned x = (r * 5 + g * 7 + b * 4) >> 4; return SkPackARGB32(0, x, x, x) | (c & (SK_A32_MASK << SK_A32_SHIFT)); } |