File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ int32_t gHeight;
4343
4444rs_allocation gBlendSource;
4545void blend9(uchar *out, uint32_t x, uint32_t y) {
46- uint32_t x1 = min(x+1, (uint32_t )gWidth);
47- uint32_t x2 = max(x-1, (uint32_t )0);
48- uint32_t y1 = min(y+1, (uint32_t )gHeight);
49- uint32_t y2 = max(y-1, (uint32_t )0);
46+ uint32_t x1 = min((int32_t) x+1, (int32_t )gWidth);
47+ uint32_t x2 = max((int32_t) x-1, (int32_t )0);
48+ uint32_t y1 = min((int32_t) y+1, (int32_t )gHeight);
49+ uint32_t y2 = max((int32_t) y-1, (int32_t )0);
5050
5151 uint p00 = 56 * ((uchar *)rsGetElementAt(gBlendSource, x1, y1))[0];
5252 uint p01 = 114 * ((uchar *)rsGetElementAt(gBlendSource, x, y1))[0];
You can’t perform that action at this time.
0 commit comments