Loading graphics/java/android/renderscript/SimpleMesh.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -290,6 +290,11 @@ public class SimpleMesh extends BaseObj { } } public void addTriangle(int idx1, int idx2, int idx3) { public void addTriangle(int idx1, int idx2, int idx3) { if((idx1 >= mVtxCount) || (idx1 < 0) || (idx2 >= mVtxCount) || (idx2 < 0) || (idx3 >= mVtxCount) || (idx3 < 0)) { throw new IllegalStateException("Index provided greater than vertex count."); } if ((mIndexCount + 3) >= mIndexData.length) { if ((mIndexCount + 3) >= mIndexData.length) { short t[] = new short[mIndexData.length * 2]; short t[] = new short[mIndexData.length * 2]; System.arraycopy(mIndexData, 0, t, 0, mIndexData.length); System.arraycopy(mIndexData, 0, t, 0, mIndexData.length); Loading libs/rs/rsContext.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -99,6 +99,7 @@ public: uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait); uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait); bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace); bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace); bool runScript(Script *s, uint32_t launchID); void initToClient(); void initToClient(); void deinitToClient(); void deinitToClient(); Loading Loading @@ -212,7 +213,6 @@ private: void initEGL(); void initEGL(); bool runScript(Script *s, uint32_t launchID); bool runRootScript(); bool runRootScript(); static void * threadProc(void *); static void * threadProc(void *); Loading libs/rs/rsScriptC_Lib.cpp +10 −0 Original line number Original line Diff line number Diff line Loading @@ -1008,6 +1008,13 @@ static uint32_t SC_toClient(void *data, int cmdID, int len, int waitForSpace) return rsc->sendMessageToClient(data, cmdID, len, waitForSpace != 0); return rsc->sendMessageToClient(data, cmdID, len, waitForSpace != 0); } } static void SC_scriptCall(int scriptID) { GET_TLS(); rsc->runScript((Script *)scriptID, 0); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Class implementation // Class implementation ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -1289,6 +1296,9 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { { "debugHexI32", (void *)&SC_debugHexI32, { "debugHexI32", (void *)&SC_debugHexI32, "void", "(void *, int)" }, "void", "(void *, int)" }, { "scriptCall", (void *)&SC_scriptCall, "void", "(int)" }, { NULL, NULL, NULL, NULL } { NULL, NULL, NULL, NULL } }; }; Loading Loading
graphics/java/android/renderscript/SimpleMesh.java +5 −0 Original line number Original line Diff line number Diff line Loading @@ -290,6 +290,11 @@ public class SimpleMesh extends BaseObj { } } public void addTriangle(int idx1, int idx2, int idx3) { public void addTriangle(int idx1, int idx2, int idx3) { if((idx1 >= mVtxCount) || (idx1 < 0) || (idx2 >= mVtxCount) || (idx2 < 0) || (idx3 >= mVtxCount) || (idx3 < 0)) { throw new IllegalStateException("Index provided greater than vertex count."); } if ((mIndexCount + 3) >= mIndexData.length) { if ((mIndexCount + 3) >= mIndexData.length) { short t[] = new short[mIndexData.length * 2]; short t[] = new short[mIndexData.length * 2]; System.arraycopy(mIndexData, 0, t, 0, mIndexData.length); System.arraycopy(mIndexData, 0, t, 0, mIndexData.length); Loading
libs/rs/rsContext.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -99,6 +99,7 @@ public: uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait); uint32_t getMessageToClient(void *data, size_t *receiveLen, size_t bufferLen, bool wait); bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace); bool sendMessageToClient(void *data, uint32_t cmdID, size_t len, bool waitForSpace); bool runScript(Script *s, uint32_t launchID); void initToClient(); void initToClient(); void deinitToClient(); void deinitToClient(); Loading Loading @@ -212,7 +213,6 @@ private: void initEGL(); void initEGL(); bool runScript(Script *s, uint32_t launchID); bool runRootScript(); bool runRootScript(); static void * threadProc(void *); static void * threadProc(void *); Loading
libs/rs/rsScriptC_Lib.cpp +10 −0 Original line number Original line Diff line number Diff line Loading @@ -1008,6 +1008,13 @@ static uint32_t SC_toClient(void *data, int cmdID, int len, int waitForSpace) return rsc->sendMessageToClient(data, cmdID, len, waitForSpace != 0); return rsc->sendMessageToClient(data, cmdID, len, waitForSpace != 0); } } static void SC_scriptCall(int scriptID) { GET_TLS(); rsc->runScript((Script *)scriptID, 0); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // Class implementation // Class implementation ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -1289,6 +1296,9 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = { { "debugHexI32", (void *)&SC_debugHexI32, { "debugHexI32", (void *)&SC_debugHexI32, "void", "(void *, int)" }, "void", "(void *, int)" }, { "scriptCall", (void *)&SC_scriptCall, "void", "(int)" }, { NULL, NULL, NULL, NULL } { NULL, NULL, NULL, NULL } }; }; Loading