diff options
author | Jason Sams <rjsams@android.com> | 2009-11-03 11:25:42 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-11-03 11:25:42 -0800 |
commit | 9d5e03db9929271f56ac4a0078d9474d7011efcd (patch) | |
tree | 8052ee61aa0c6b7a1fc1ebdfcee1ea8f32a3dd5b /libs/rs/rsAllocation.cpp | |
parent | c4918c30147d72c44e9a2a9fe7b9cbe88948677a (diff) | |
download | frameworks_base-9d5e03db9929271f56ac4a0078d9474d7011efcd.zip frameworks_base-9d5e03db9929271f56ac4a0078d9474d7011efcd.tar.gz frameworks_base-9d5e03db9929271f56ac4a0078d9474d7011efcd.tar.bz2 |
Fix RS bugs. We were holding a pointer to the script text from the java vm. Move freeing of objects to before context teardown to allow allocations to clean up their data.
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r-- | libs/rs/rsAllocation.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 2cbfe17..38cec64 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -54,6 +54,17 @@ Allocation::~Allocation() { free(mPtr); mPtr = NULL; + + if (mBufferID) { + // Causes a SW crash.... + //LOGV(" mBufferID %i", mBufferID); + //glDeleteBuffers(1, &mBufferID); + //mBufferID = 0; + } + if (mTextureID) { + glDeleteTextures(1, &mTextureID); + mTextureID = 0; + } } void Allocation::setCpuWritable(bool) |