diff options
author | Alex Sakhartchouk <alexst@google.com> | 2012-02-21 09:23:17 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-21 09:23:17 -0800 |
commit | c10e48901c6531167dd001280ad9207023a01431 (patch) | |
tree | 63ed77f6542f8399835e80e90810b17ed786eb9e /tests | |
parent | 582e95bc373f3aad97e871bf95f8566cf8eb6823 (diff) | |
parent | 071e54d7a3b21ea5eeabff49ac979952b38c77a5 (diff) | |
download | frameworks_base-c10e48901c6531167dd001280ad9207023a01431.zip frameworks_base-c10e48901c6531167dd001280ad9207023a01431.tar.gz frameworks_base-c10e48901c6531167dd001280ad9207023a01431.tar.bz2 |
Merge "Making sure stranded objects are not left behind."
Diffstat (limited to 'tests')
-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); |