diff options
| author | Jason Sams <rjsams@android.com> | 2010-05-17 14:55:34 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-05-17 14:55:34 -0700 |
| commit | ce92d4baf7a5bce097228fdd4498601764cd4014 (patch) | |
| tree | cb18dc86df54c5740f1b061d7e0eeda1a0d83314 /rsScriptC.cpp | |
| parent | 568613e5c043c473e5e6632b3a38de2a97864908 (diff) | |
| download | android_frameworks_rs-ce92d4baf7a5bce097228fdd4498601764cd4014.tar.gz android_frameworks_rs-ce92d4baf7a5bce097228fdd4498601764cd4014.tar.bz2 android_frameworks_rs-ce92d4baf7a5bce097228fdd4498601764cd4014.zip | |
Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
Diffstat (limited to 'rsScriptC.cpp')
| -rw-r--r-- | rsScriptC.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index e9ba2267..8a60d1ef 100644 --- a/rsScriptC.cpp +++ b/rsScriptC.cpp @@ -71,6 +71,22 @@ void ScriptC::setupScript() } } +const Allocation *ScriptC::ptrToAllocation(const void *ptr) const +{ + if (!ptr) { + return NULL; + } + for (uint32_t ct=0; ct < mEnviroment.mFieldCount; ct++) { + if (!mSlots[ct].get()) + continue; + if (mSlots[ct]->getPtr() == ptr) { + return mSlots[ct].get(); + } + } + LOGE("ScriptC::ptrToAllocation, failed to find %p", ptr); + return NULL; +} + uint32_t ScriptC::run(Context *rsc, uint32_t launchIndex) { |
