1 #include "rsScriptGroup2.h" 2 3 #include "rsContext.h" 4 5 namespace android { 6 namespace renderscript { 7 8 ScriptGroup2::~ScriptGroup2() { 9 if (mRSC->mHal.funcs.scriptgroup.destroy) { 10 mRSC->mHal.funcs.scriptgroup.destroy(mRSC, this); 11 } 12 } 13 14 void ScriptGroup2::execute(Context* rsc) { 15 if (rsc->mHal.funcs.scriptgroup.execute) { 16 rsc->mHal.funcs.scriptgroup.execute(rsc, this); 17 } 18 } 19 20 RsScriptGroup2 rsi_ScriptGroup2Create(Context* rsc, const char* name, 21 size_t nameLength, 22 const char* cacheDir, 23 size_t cacheDirLength, 24 RsClosure* closures, size_t numClosures) { 25 ScriptGroup2* group = new ScriptGroup2(rsc, name, cacheDir, 26 (Closure**)closures, numClosures); 27 28 // Create a device-specific implementation by calling the device driver 29 if (rsc->mHal.funcs.scriptgroup.init) { 30 rsc->mHal.funcs.scriptgroup.init(rsc, group); 31 } 32 33 group->incUserRef(); 34 35 return group; 36 } 37 38 } // namespace renderscript 39 } // namespace android 40