Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c10e4890 authored by Alex Sakhartchouk's avatar Alex Sakhartchouk Committed by Android (Google) Code Review
Browse files

Merge "Making sure stranded objects are not left behind."

parents 582e95bc 071e54d7
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -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);