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

Commit 1de0b871 authored by Jason Sams's avatar Jason Sams
Browse files

Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.

Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
parent 38a95448
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -138,7 +138,6 @@ public class RenderScript {
    native void nScriptSetClearDepth(int script, float depth);
    native void nScriptSetClearStencil(int script, int stencil);
    native void nScriptSetTimeZone(int script, byte[] timeZone);
    native void nScriptSetRoot(boolean isRoot);
    native void nScriptInvoke(int id, int slot);
    native void nScriptInvokeData(int id, int slot);
    native void nScriptInvokeV(int id, int slot, byte[] params);
+2 −3
Original line number Diff line number Diff line
@@ -39,11 +39,11 @@ public class ScriptC extends Script {

    protected ScriptC(RenderScript rs, Resources resources, int resourceID, boolean isRoot) {
        super(0, rs);
        mID = internalCreate(rs, resources, resourceID, isRoot);
        mID = internalCreate(rs, resources, resourceID);
    }


    private static synchronized int internalCreate(RenderScript rs, Resources resources, int resourceID, boolean isRoot) {
    private static synchronized int internalCreate(RenderScript rs, Resources resources, int resourceID) {
        byte[] pgm;
        int pgmLength;
        InputStream is = resources.openRawResource(resourceID);
@@ -74,7 +74,6 @@ public class ScriptC extends Script {

        rs.nScriptCBegin();
        rs.nScriptCSetScript(pgm, 0, pgmLength);
        rs.nScriptSetRoot(isRoot);
        return rs.nScriptCCreate();
    }

+0 −8
Original line number Diff line number Diff line
@@ -949,13 +949,6 @@ nScriptInvokeV(JNIEnv *_env, jobject _this, jint script, jint slot, jbyteArray d
    _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
}

static void
nScriptSetRoot(JNIEnv *_env, jobject _this, jboolean isRoot)
{
    RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
    LOG_API("nScriptCSetRoot, con(%p), isRoot(%i)", con, isRoot);
    rsScriptSetRoot(con, isRoot);
}

// -----------------------------------

@@ -1421,7 +1414,6 @@ static JNINativeMethod methods[] = {
{"nScriptSetClearDepth",           "(IF)V",                                (void*)nScriptSetClearDepth },
{"nScriptSetClearStencil",         "(II)V",                                (void*)nScriptSetClearStencil },
{"nScriptSetTimeZone",             "(I[B)V",                               (void*)nScriptSetTimeZone },
{"nScriptSetRoot",                 "(Z)V",                                 (void*)nScriptSetRoot },
{"nScriptInvoke",                  "(II)V",                                (void*)nScriptInvoke },
{"nScriptInvokeData",              "(II)V",                                (void*)nScriptInvokeData },
{"nScriptInvokeV",                 "(II[B)V",                              (void*)nScriptInvokeV },
+0 −1
Original line number Diff line number Diff line
@@ -217,7 +217,6 @@ public class FilmRS {

        ScriptC.Builder sb = new ScriptC.Builder(mRS);
        sb.setScript(mRes, R.raw.filmstrip);
        //sb.setRoot(true);
        //sb.setType(mStripPositionType, "Pos", 1);
        mScriptStrip = sb.create();
        mScriptStrip.setClearColor(0.0f, 0.0f, 0.0f, 1.0f);
+0 −4
Original line number Diff line number Diff line
@@ -293,10 +293,6 @@ ScriptInvokeV {
	togglePlay
	}

ScriptSetRoot {
	param bool isRoot
	}

ScriptSetVarI {
	param RsScript s
	param uint32_t slot
Loading