diff options
author | Stephen Hines <srhines@google.com> | 2011-05-02 18:06:48 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2011-05-02 18:06:48 -0700 |
commit | c32b99404b3ec350bc0b612a52fac272e71cb9e8 (patch) | |
tree | 4b84948c00bfd150ab2ea23f95e2b9f62fb6495b /tests/RenderScriptTests | |
parent | 7fba67e63096f87d16f8c171b3b830e4d79aac40 (diff) | |
download | frameworks_base-c32b99404b3ec350bc0b612a52fac272e71cb9e8.zip frameworks_base-c32b99404b3ec350bc0b612a52fac272e71cb9e8.tar.gz frameworks_base-c32b99404b3ec350bc0b612a52fac272e71cb9e8.tar.bz2 |
Clean up use of rsSetObject/rsClearObject.
Change-Id: I8d8e198135d680a1cab7fde64407dec8030bd6a6
Diffstat (limited to 'tests/RenderScriptTests')
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; } |