summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry Hong <harryhong77@gmail.com>2014-07-02 17:46:36 +0900
committerHarry Hong <harryhong77@gmail.com>2014-07-02 18:09:07 +0900
commitcaf25cf58f45c3c2039de16d37242deab0e45c57 (patch)
treeaecccb9bfb60eb4b19607508e71f0dee9acc649f
parentb31d50001d047ec11a4282f6c7e654124473d8c4 (diff)
downloadcts-caf25cf58f45c3c2039de16d37242deab0e45c57.tar.gz
improve TestVirtualDisplayRecycles to reduce memory usage
TestVirtualDisplayRecycles allocates lots of memory. in low memory system, this test get failed because android.media.cts process died by low-memory killer easily. To prevent low memory case during test, - clear the allocated buffer for dalvik to get more chance to do GC at window cleanup - call cleanupGl() at stopComposition Change-Id: I1c118ceba9dfe29a84bd9edad43eac21ba50a92b Signed-off-by: Harry Hong <hhong@nvidia.com>
-rw-r--r--tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
index dc767c98b85..66a3e381ce1 100644
--- a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
@@ -643,6 +643,7 @@ public class EncodeVirtualDisplayWithCompositionTest extends AndroidTestCase {
} catch (InterruptedException e) {
// don't care
}
+ cleanupGl();
mCompositionThread = null;
mSurface = null;
mStartCompletionSemaphore = null;
@@ -947,6 +948,7 @@ public class EncodeVirtualDisplayWithCompositionTest extends AndroidTestCase {
public void cleanup() {
mNumTextureUpdated.set(0);
+ mVerticesData.clear();
if (mTextureId != 0) {
int[] textures = new int[] {
mTextureId