summaryrefslogtreecommitdiff
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2009-11-03 15:11:03 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2009-11-03 15:11:03 -0800
commitebca5eec1c1e0a0cfc4ad25d1aacb1a3e30e44ef (patch)
tree43ef095258934e63e88b3245eac4cfa5dfe4f0e9 /libs/rs/rsAllocation.cpp
parent2e6e80b9db0168ea69ba78088412e9ee4cb23a40 (diff)
parent83665194abceeb7681cb7ac49a4b71aa6e96b1b1 (diff)
am 83665194: Merge change I9d5e03db into eclair
Merge commit '83665194abceeb7681cb7ac49a4b71aa6e96b1b1' into eclair-mr2 * commit '83665194abceeb7681cb7ac49a4b71aa6e96b1b1': 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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 2cbfe17d40a9..38cec64e3753 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)