diff options
author | Stephen Hines <srhines@google.com> | 2011-05-03 14:32:11 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-03 14:32:11 -0700 |
commit | ceae02e2c728155943e5ad686d562817b3d7f3fd (patch) | |
tree | c49eb11552b5f71f1adbe766fc3f200c06efc573 | |
parent | b969d2d9c1771a3a4c813f2c2824522659d26927 (diff) | |
parent | c32b99404b3ec350bc0b612a52fac272e71cb9e8 (diff) | |
download | frameworks_base-ceae02e2c728155943e5ad686d562817b3d7f3fd.zip frameworks_base-ceae02e2c728155943e5ad686d562817b3d7f3fd.tar.gz frameworks_base-ceae02e2c728155943e5ad686d562817b3d7f3fd.tar.bz2 |
Merge "Clean up use of rsSetObject/rsClearObject."
4 files changed, 11 insertions, 15 deletions
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs index f2f9a36..16ebe08 100644 --- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs +++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/threshold.rs @@ -63,7 +63,7 @@ static void computeGaussianWeights() { static void copyInput() { rs_allocation ain; - rsSetObject(&ain,rsGetAllocation(InPixel)); + ain = rsGetAllocation(InPixel); uint32_t dimx = rsAllocationGetDimX(ain); uint32_t dimy = rsAllocationGetDimY(ain); for (uint32_t y = 0; y < dimy; y++) { diff --git a/tests/RenderScriptTests/PerfTest/src/com/android/perftest/rsbench.rs b/tests/RenderScriptTests/PerfTest/src/com/android/perftest/rsbench.rs index 3fc59fc..91bac88 100644 --- a/tests/RenderScriptTests/PerfTest/src/com/android/perftest/rsbench.rs +++ b/tests/RenderScriptTests/PerfTest/src/com/android/perftest/rsbench.rs @@ -109,11 +109,11 @@ static void setupOffscreenTarget() { static void displayFontSamples(int fillNum) { rs_font fonts[5]; - rsSetObject(&fonts[0], gFontSans); - rsSetObject(&fonts[1], gFontSerif); - rsSetObject(&fonts[2], gFontSerifBold); - rsSetObject(&fonts[3], gFontSerifBoldItalic); - rsSetObject(&fonts[4], gFontSans); + fonts[0] = gFontSans; + fonts[1] = gFontSerif; + fonts[2] = gFontSerifBold; + fonts[3] = gFontSerifBoldItalic; + fonts[4] = gFontSans; uint width = gRenderSurfaceW; uint height = gRenderSurfaceH; @@ -140,10 +140,6 @@ static void displayFontSamples(int fillNum) { } } } - - for (int i = 0; i < 5; i ++) { - rsClearObject(&fonts[i]); - } } static void bindProgramVertexOrtho() { diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/rslist.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/rslist.rs index aeae13f..d8663fb 100644 --- a/tests/RenderScriptTests/tests/src/com/android/rs/test/rslist.rs +++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/rslist.rs @@ -47,7 +47,7 @@ int root(void) { rsgBindFont(gFont); rs_allocation listAlloc; - rsSetObject(&listAlloc, rsGetAllocation(gList)); + listAlloc = rsGetAllocation(gList); int allocSize = rsAllocationGetDimX(listAlloc); int width = rsgGetWidth(); diff --git a/tests/RenderScriptTests/tests/src/com/android/rs/test/rstypes.rs b/tests/RenderScriptTests/tests/src/com/android/rs/test/rstypes.rs index f3bf244..22d9c13 100644 --- a/tests/RenderScriptTests/tests/src/com/android/rs/test/rstypes.rs +++ b/tests/RenderScriptTests/tests/src/com/android/rs/test/rstypes.rs @@ -48,17 +48,17 @@ static bool basic_test(uint32_t index) { struct my_struct structTest; - rsSetObject(&fontTestLocal, fontTest); + fontTestLocal = fontTest; //allocationTestLocal = allocationTest; - rsSetObject(&fontTest, fontTestLocal); + fontTest = fontTestLocal; //allocationTest = allocationTestLocal; /*for (int i = 0; i < 4; i++) { - rsSetObject(&fontTestLocalArray[i], fontTestLocal); + fontTestLocalArray[i] = fontTestLocal; }*/ - /*rsSetObject(&fontTest, fontTestLocalArray[3]);*/ + /*fontTest = fontTestLocalArray[3];*/ return failed; } |