From 55747ccdfb889e143f55c9ae67a012a8913efa39 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Fri, 18 Dec 2009 22:50:15 +0000 Subject: [PATCH] Native client build fix. Patch from David Sehr. Signed-off-by: Adam Langley http://codereview.appspot.com/180090 git-svn-id: http://skia.googlecode.com/svn/trunk@464 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/core/SkFilterProc.cpp | 33 ++++++++++++++++----------------- src/core/SkRegion.cpp | 4 +--- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/core/SkFilterProc.cpp b/src/core/SkFilterProc.cpp index 814bafe49..7f1e7a1d7 100644 --- a/src/core/SkFilterProc.cpp +++ b/src/core/SkFilterProc.cpp @@ -159,24 +159,24 @@ const SkFilter32Proc* SkGetFilter32ProcTable() /////////////////////////////////////////////////////////////////////////////// -static unsigned bilerptr00(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr00(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { return *a00; } -static unsigned bilerptr01(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr01(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t lo = (3 * LO_PAIR(c00) + LO_PAIR(c01)) >> 2; uint32_t hi = (3 * HI_PAIR(c00) + HI_PAIR(c01)) >> 2; return COMBINE(lo, hi); } -static unsigned bilerptr02(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr02(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t lo = (LO_PAIR(c00) + LO_PAIR(c01)) >> 1; uint32_t hi = (HI_PAIR(c00) + HI_PAIR(c01)) >> 1; return COMBINE(lo, hi); } -static unsigned bilerptr03(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr03(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t lo = (LO_PAIR(c00) + 3 * LO_PAIR(c01)) >> 2; @@ -184,14 +184,14 @@ static unsigned bilerptr03(const uint32_t* a00, const uint32_t* a01, const uint3 return COMBINE(lo, hi); } -static unsigned bilerptr10(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr10(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c10 = *a10; uint32_t lo = (3 * LO_PAIR(c00) + LO_PAIR(c10)) >> 2; uint32_t hi = (3 * HI_PAIR(c00) + HI_PAIR(c10)) >> 2; return COMBINE(lo, hi); } -static unsigned bilerptr11(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr11(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -200,7 +200,7 @@ static unsigned bilerptr11(const uint32_t* a00, const uint32_t* a01, const uint3 uint32_t hi = (9 * HI_PAIR(c00) + 3 * (HI_PAIR(c01) + HI_PAIR(c10)) + HI_PAIR(c11)) >> 4; return COMBINE(lo, hi); } -static unsigned bilerptr12(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr12(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -209,7 +209,7 @@ static unsigned bilerptr12(const uint32_t* a00, const uint32_t* a01, const uint3 uint32_t hi = (3 * (HI_PAIR(c00) + HI_PAIR(c01)) + HI_PAIR(c10) + HI_PAIR(c11)) >> 3; return COMBINE(lo, hi); } -static unsigned bilerptr13(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr13(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -219,14 +219,14 @@ static unsigned bilerptr13(const uint32_t* a00, const uint32_t* a01, const uint3 return COMBINE(lo, hi); } -static unsigned bilerptr20(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr20(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c10 = *a10; uint32_t lo = (LO_PAIR(c00) + LO_PAIR(c10)) >> 1; uint32_t hi = (HI_PAIR(c00) + HI_PAIR(c10)) >> 1; return COMBINE(lo, hi); } -static unsigned bilerptr21(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr21(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -235,7 +235,7 @@ static unsigned bilerptr21(const uint32_t* a00, const uint32_t* a01, const uint3 uint32_t hi = (3 * (HI_PAIR(c00) + HI_PAIR(c10)) + HI_PAIR(c01) + HI_PAIR(c11)) >> 3; return COMBINE(lo, hi); } -static unsigned bilerptr22(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr22(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -244,7 +244,7 @@ static unsigned bilerptr22(const uint32_t* a00, const uint32_t* a01, const uint3 uint32_t hi = (HI_PAIR(c00) + HI_PAIR(c01) + HI_PAIR(c10) + HI_PAIR(c11)) >> 2; return COMBINE(lo, hi); } -static unsigned bilerptr23(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr23(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -254,14 +254,14 @@ static unsigned bilerptr23(const uint32_t* a00, const uint32_t* a01, const uint3 return COMBINE(lo, hi); } -static unsigned bilerptr30(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr30(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c10 = *a10; uint32_t lo = (LO_PAIR(c00) + 3 * LO_PAIR(c10)) >> 2; uint32_t hi = (HI_PAIR(c00) + 3 * HI_PAIR(c10)) >> 2; return COMBINE(lo, hi); } -static unsigned bilerptr31(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr31(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -270,7 +270,7 @@ static unsigned bilerptr31(const uint32_t* a00, const uint32_t* a01, const uint3 uint32_t hi = (9 * HI_PAIR(c10) + 3 * (HI_PAIR(c00) + HI_PAIR(c11)) + HI_PAIR(c01)) >> 4; return COMBINE(lo, hi); } -static unsigned bilerptr32(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr32(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -279,7 +279,7 @@ static unsigned bilerptr32(const uint32_t* a00, const uint32_t* a01, const uint3 uint32_t hi = (3 * (HI_PAIR(c10) + HI_PAIR(c11)) + HI_PAIR(c00) + HI_PAIR(c01)) >> 3; return COMBINE(lo, hi); } -static unsigned bilerptr33(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { +static uint32_t bilerptr33(const uint32_t* a00, const uint32_t* a01, const uint32_t* a10, const uint32_t* a11) { uint32_t c00 = *a00; uint32_t c01 = *a01; uint32_t c10 = *a10; @@ -300,4 +300,3 @@ const SkFilterPtrProc* SkGetBilinearFilterPtrProcTable() { return gBilerpPtrProcs; } - diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp index b48f3bbc0..032dc81bd 100644 --- a/src/core/SkRegion.cpp +++ b/src/core/SkRegion.cpp @@ -361,7 +361,7 @@ static SkRegion::RunType* find_scanline(const SkRegion::RunType runs[], int y) return NULL; } -bool SkRegion::contains(int x, int y) const +bool SkRegion::contains(int32_t x, int32_t y) const { if (!fBounds.contains(x, y)) return false; @@ -1337,5 +1337,3 @@ bool SkRegion::debugSetRuns(const RunType runs[], int count) { } #endif - -