From 76692c34c7e2d69f4e43133e516c580f08caed99 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Thu, 15 Jan 2009 16:12:09 -0800 Subject: auto import from //branches/cupcake/...@126645 --- src/effects/SkGradientShader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/effects/SkGradientShader.cpp') diff --git a/src/effects/SkGradientShader.cpp b/src/effects/SkGradientShader.cpp index a1674cb..9b5d922 100644 --- a/src/effects/SkGradientShader.cpp +++ b/src/effects/SkGradientShader.cpp @@ -608,7 +608,7 @@ private: }; // Return true if fx, fx+dx, fx+2*dx, ... is always in range -static bool no_need_for_clamp(int fx, int dx, int count) +static inline bool no_need_for_clamp(int fx, int dx, int count) { SkASSERT(count > 0); return (unsigned)((fx | (fx + (count - 1) * dx)) >> 8) <= 0xFF; @@ -733,7 +733,7 @@ bool Linear_Gradient::asABitmap(SkBitmap* bitmap, SkMatrix* matrix, #ifdef TEST_GRADIENT_DITHER static void dither_memset16(uint16_t dst[], uint16_t value, uint16_t other, int count) { - if ((unsigned)dst & 2) + if (reinterpret_cast(dst) & 2) { *dst++ = value; count -= 1; -- cgit v1.1