diff options
| author | Jason Sams <rjsams@android.com> | 2009-09-25 14:51:22 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2009-09-25 14:51:22 -0700 |
| commit | e514b45de8561fbc6ef6770845102ca10b0a69d7 (patch) | |
| tree | 572fdc8b1dbc14b53c61f9c81f90fbc642024b45 /rsProgramRaster.cpp | |
| parent | 86f1b23aaaf9b8822a009d8c3e585e46768abb6a (diff) | |
| download | android_frameworks_rs-e514b45de8561fbc6ef6770845102ca10b0a69d7.tar.gz android_frameworks_rs-e514b45de8561fbc6ef6770845102ca10b0a69d7.tar.bz2 android_frameworks_rs-e514b45de8561fbc6ef6770845102ca10b0a69d7.zip | |
Improve renderscript context teardown. Track object in the system and then force their cleanup by releasing all user references once destroy context is called. Java layer will no longer send destroy notifications for objects garbage collected once a context is destroyed.
Diffstat (limited to 'rsProgramRaster.cpp')
| -rw-r--r-- | rsProgramRaster.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rsProgramRaster.cpp b/rsProgramRaster.cpp index b968fe15..2a9c4abd 100644 --- a/rsProgramRaster.cpp +++ b/rsProgramRaster.cpp @@ -24,12 +24,13 @@ using namespace android; using namespace android::renderscript; -ProgramRaster::ProgramRaster(Element *in, +ProgramRaster::ProgramRaster(Context *rsc, + Element *in, Element *out, bool pointSmooth, bool lineSmooth, bool pointSprite) : - Program(in, out) + Program(rsc, in, out) { mPointSmooth = pointSmooth; mLineSmooth = lineSmooth; @@ -95,7 +96,7 @@ ProgramRasterState::~ProgramRasterState() void ProgramRasterState::init(Context *rsc, int32_t w, int32_t h) { - ProgramRaster *pr = new ProgramRaster(NULL, NULL, false, false, false); + ProgramRaster *pr = new ProgramRaster(rsc, NULL, NULL, false, false, false); mDefault.set(pr); } @@ -108,7 +109,8 @@ RsProgramRaster rsi_ProgramRasterCreate(Context * rsc, RsElement in, RsElement o bool lineSmooth, bool pointSprite) { - ProgramRaster *pr = new ProgramRaster(static_cast<Element *>(in), + ProgramRaster *pr = new ProgramRaster(rsc, + static_cast<Element *>(in), static_cast<Element *>(out), pointSmooth, lineSmooth, |
