From 2089cddba3e6e6bb7643ed670ee038dce0b8db6e Mon Sep 17 00:00:00 2001 From: Jean-Luc Brouillet Date: Tue, 19 May 2015 14:12:43 -0700 Subject: Fix warnings in RenderScript sources. An upcoming CL fixes a bug where many warning were disabled. This fixes the warnings (that are turned into errors in most of our builds) before the CL lands. Also, adds long & unsigned long testing for a few tests. Change-Id: Id6826e968db2d06ef9910fe775309d1c3872cdc5 --- java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs') diff --git a/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs b/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs index 40d4fa2d..1309df59 100644 --- a/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs +++ b/java/tests/ImageProcessing_jb/src/com/android/rs/image/threshold.rs @@ -85,7 +85,7 @@ uchar4 RS_KERNEL vert(uint32_t x, uint32_t y) { } } else { for (int r = -radius; r <= radius; r ++) { - int validH = rsClamp((int)y + r, (int)0, (int)(height - 1)); + int validH = clamp((int)y + r, (int)0, (int)(height - 1)); float4 i = rsGetElementAt_float4(ScratchPixel2, x, validH); blurredPixel += i.xyz * gaussian[gi++]; } @@ -107,7 +107,7 @@ float4 RS_KERNEL horz(uint32_t x, uint32_t y) { } else { for (int r = -radius; r <= radius; r ++) { // Stepping left and right away from the pixel - int validX = rsClamp((int)x + r, (int)0, (int)(width - 1)); + int validX = clamp((int)x + r, (int)0, (int)(width - 1)); float4 i = rsGetElementAt_float4(ScratchPixel1, validX, y); blurredPixel += i * gaussian[gi++]; } @@ -115,4 +115,3 @@ float4 RS_KERNEL horz(uint32_t x, uint32_t y) { return blurredPixel; } - -- cgit v1.2.3