From c1992933f1d97edd3f2f4c7dcbd81ffea6f6c1d8 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Fri, 4 May 2012 12:54:20 +0000 Subject: [PATCH] fix/revert the unsigned-shift change made to clamp in 3836. For clamp we want to see the negatives, so we must have a signed shift. git-svn-id: http://skia.googlecode.com/svn/trunk@3839 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkBitmapProcState_matrixProcs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp index a8a2821524..c043e8610c 100644 --- a/src/core/SkBitmapProcState_matrixProcs.cpp +++ b/src/core/SkBitmapProcState_matrixProcs.cpp @@ -39,8 +39,8 @@ void decal_nofilter_scale(uint32_t dst[], SkFixed fx, SkFixed dx, int count); void decal_filter_scale(uint32_t dst[], SkFixed fx, SkFixed dx, int count); #define MAKENAME(suffix) ClampX_ClampY ## suffix -#define TILEX_PROCF(fx, max) SkClampMax(SK_USHIFT16(fx), max) -#define TILEY_PROCF(fy, max) SkClampMax(SK_USHIFT16(fy), max) +#define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) +#define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) #define TILEX_LOW_BITS(fx, max) (((fx) >> 12) & 0xF) #define TILEY_LOW_BITS(fy, max) (((fy) >> 12) & 0xF) #define CHECK_FOR_DECAL