summaryrefslogtreecommitdiff
path: root/rsProgramFragmentStore.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-06-10 15:04:38 -0700
committerJason Sams <rjsams@android.com>2009-06-10 15:04:38 -0700
commita0a1b6fbece2eb8d72d788422ab3e5f58d5a9216 (patch)
tree6d1c76249b13b3c7f84e29edb1f32a3c9cf42f5b /rsProgramFragmentStore.cpp
parent1030893d9b99b72468034da13df025bda479bb97 (diff)
downloadrs-a0a1b6fbece2eb8d72d788422ab3e5f58d5a9216.tar.gz
Add named objects and implement support for ProgramFragmentStore and ProgramFragment to be used by name in scripts.
Diffstat (limited to 'rsProgramFragmentStore.cpp')
-rw-r--r--rsProgramFragmentStore.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/rsProgramFragmentStore.cpp b/rsProgramFragmentStore.cpp
index 7f5d5f49..a1855a62 100644
--- a/rsProgramFragmentStore.cpp
+++ b/rsProgramFragmentStore.cpp
@@ -202,7 +202,6 @@ ProgramFragmentStoreState::~ProgramFragmentStoreState()
}
-
namespace android {
namespace renderscript {
@@ -238,7 +237,6 @@ RsProgramFragmentStore rsi_ProgramFragmentStoreCreate(Context *rsc)
ProgramFragmentStore *pfs = rsc->mStateFragmentStore.mPFS;
pfs->incRef();
rsc->mStateFragmentStore.mPFS = 0;
-
return pfs;
}
@@ -247,6 +245,17 @@ void rsi_ProgramFragmentStoreDither(Context *rsc, bool enable)
rsc->mStateFragmentStore.mPFS->setDitherEnable(enable);
}
+void rsi_ProgramFragmentStoreDestroy(Context *rsc, RsProgramFragmentStore vpfs)
+{
+ ProgramFragmentStore *pfs = (ProgramFragmentStore *)vpfs;
+ if (pfs->getName()) {
+ rsc->removeName(pfs);
+ }
+ pfs->decRef();
+}
+
+
+
}
}