diff options
| author | Jason Sams <rjsams@android.com> | 2009-06-10 15:04:38 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2009-06-10 15:04:38 -0700 |
| commit | 3eaa338e11a3b0d6b87d705e5bb95625e82347bd (patch) | |
| tree | f0e91b1fbf362b86b54d84325581f7544536a38c /libs/rs/rsProgramFragmentStore.cpp | |
| parent | da423d8479a2cefb456a03d7dc550e74e473acf4 (diff) | |
| download | frameworks_base-3eaa338e11a3b0d6b87d705e5bb95625e82347bd.zip frameworks_base-3eaa338e11a3b0d6b87d705e5bb95625e82347bd.tar.gz frameworks_base-3eaa338e11a3b0d6b87d705e5bb95625e82347bd.tar.bz2 | |
Add named objects and implement support for ProgramFragmentStore and ProgramFragment to be used by name in scripts.
Diffstat (limited to 'libs/rs/rsProgramFragmentStore.cpp')
| -rw-r--r-- | libs/rs/rsProgramFragmentStore.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/rs/rsProgramFragmentStore.cpp b/libs/rs/rsProgramFragmentStore.cpp index 7f5d5f4..a1855a6 100644 --- a/libs/rs/rsProgramFragmentStore.cpp +++ b/libs/rs/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(); +} + + + } } |
