diff options
author | Alex Sakhartchouk <alexst@google.com> | 2012-02-17 16:30:36 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2012-02-17 16:30:36 -0800 |
commit | 071e54d7a3b21ea5eeabff49ac979952b38c77a5 (patch) | |
tree | 33e977772de21e056421d193f68e2ae23dbd1f80 /tests/RenderScriptTests/SceneGraph/src | |
parent | 9d7b99976f1571cf398808038abc1d69fb897967 (diff) | |
download | frameworks_base-071e54d7a3b21ea5eeabff49ac979952b38c77a5.zip frameworks_base-071e54d7a3b21ea5eeabff49ac979952b38c77a5.tar.gz frameworks_base-071e54d7a3b21ea5eeabff49ac979952b38c77a5.tar.bz2 |
Making sure stranded objects are not left behind.
Change-Id: If678d9dbf818e256862cfc0949015c2a4172bebd
Diffstat (limited to 'tests/RenderScriptTests/SceneGraph/src')
-rw-r--r-- | tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java index f77f483..535905a 100644 --- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java +++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/SceneManager.java @@ -71,8 +71,8 @@ public class SceneManager extends SceneGraphBase { Scene mActiveScene; private static SceneManager sSceneManager; - private Allocation sDefault2D; - private Allocation sDefaultCube; + private Allocation mDefault2D; + private Allocation mDefaultCube; private static Allocation getDefault(boolean isCube) { final int dimension = 4; @@ -101,20 +101,14 @@ public class SceneManager extends SceneGraphBase { if (sSceneManager == null) { return null; } - if (sSceneManager.sDefault2D == null) { - sSceneManager.sDefault2D = getDefault(false); - } - return sSceneManager.sDefault2D; + return sSceneManager.mDefault2D; } static Allocation getDefaultTexCube() { if (sSceneManager == null) { return null; } - if (sSceneManager.sDefaultCube == null) { - sSceneManager.sDefaultCube = getDefault(true); - } - return sSceneManager.sDefaultCube; + return sSceneManager.mDefaultCube; } public static boolean isSDCardPath(String path) { @@ -321,6 +315,10 @@ public class SceneManager extends SceneGraphBase { mRes = res; mAllocationMap = new HashMap<String, Allocation>(); + mQuad = null; + mDefault2D = getDefault(false); + mDefaultCube = getDefault(true); + mExportScript = new ScriptC_export(rs, res, R.raw.export); mTransformScript = new ScriptC_transform(rs, res, R.raw.transform); |