summaryrefslogtreecommitdiffstats
path: root/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java')
-rw-r--r--tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java
index 39aa1ee..05e36a7 100644
--- a/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java
+++ b/tests/RenderScriptTests/SceneGraph/src/com/android/scenegraph/ShaderParam.java
@@ -105,6 +105,13 @@ public abstract class ShaderParam extends SceneGraphBase {
mRsFieldItem = new ScriptField_ShaderParam_s.Item();
mRsFieldItem.transformTimestamp = 0;
+ if (mParamName != null) {
+ mRsFieldItem.paramName = SceneManager.getCachedAlloc(mParamName);
+ if (mRsFieldItem.paramName == null) {
+ mRsFieldItem.paramName = SceneManager.getStringAsAllocation(rs, mParamName);
+ SceneManager.cacheAlloc(mParamName, mRsFieldItem.paramName);
+ }
+ }
initLocalData(rs);
return mRsFieldItem;
}