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

Commit 4e8cf0c8 authored by Stephen Hines's avatar Stephen Hines
Browse files

resolved conflicts for merge of 0664479a to master

Change-Id: Ia2cb081d575dbf2bf041143f1c4f553ecd2c24f3
parents ef133841 0664479a
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -86,11 +86,7 @@ public class RenderScript {
    native void nContextInitToClient(int con);
    native void nContextDeinitToClient(int con);

    /**
     * Name of the file that holds the object cache.
     */
    private static final String CACHE_PATH = "com.android.renderscript.cache";
    static String mCachePath;
    static File mCacheDir;

     /**
     * Sets the directory to use as a persistent storage for the
@@ -105,9 +101,8 @@ public class RenderScript {
            return;
        }

        File f = new File(cacheDir, CACHE_PATH);
        mCachePath = f.getAbsolutePath();
        f.mkdirs();
        // Defer creation of cache path to nScriptCCreate().
        mCacheDir = cacheDir;
    }

    public enum ContextType {
+13 −1
Original line number Diff line number Diff line
@@ -64,6 +64,12 @@ public class ScriptC extends Script {
        rs.addAllocSizeForGC(mGCSize);
    }

    /**
     * Name of the file that holds the object cache.
     */
    private static final String CACHE_PATH = "com.android.renderscript.cache";

    static String mCachePath;

    private static synchronized int internalCreate(RenderScript rs, Resources resources, int resourceID) {
        byte[] pgm;
@@ -96,7 +102,13 @@ public class ScriptC extends Script {

        String resName = resources.getResourceEntryName(resourceID);

        // Create the RS cache path if we haven't done so already.
        if (mCachePath == null) {
            File f = new File(rs.mCacheDir, CACHE_PATH);
            mCachePath = f.getAbsolutePath();
            f.mkdirs();
        }
        Log.v(TAG, "Create script for resource = " + resName);
        return rs.nScriptCCreate(resName, rs.mCachePath, pgm, pgmLength);
        return rs.nScriptCCreate(resName, mCachePath, pgm, pgmLength);
    }
}