summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2010-12-09 12:19:46 -0800
committer Jason Sams <rjsams@android.com> 2010-12-09 12:19:46 -0800
commit546f01b6d52d8da18c7a39239a36adf5b05ccf48 (patch)
treed3582809b0db862619379bc7aedaf997c734d225
parent5476b450e50939940dcf3f15c92335cee2fc572d (diff)
Fix a severe cleanup bug where teardown of the GL
driver could occur on the wrong thread. Change-Id: Icd56182ccbd1371124a247695bf3ebd3085df450
-rw-r--r--libs/rs/rs.spec3
-rw-r--r--libs/rs/rsContext.cpp9
2 files changed, 7 insertions, 5 deletions
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec
index b1551bae744a..97ecca0e0b57 100644
--- a/libs/rs/rs.spec
+++ b/libs/rs/rs.spec
@@ -47,6 +47,9 @@ ContextSetPriority {
param int32_t priority
}
+ContextDestroy {
+}
+
AssignName {
param void *obj
param const char *name
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 35db33229c3c..2988950d532a 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -1019,6 +1019,10 @@ void rsi_ContextDump(Context *rsc, int32_t bits) {
ObjectBase::dumpAll(rsc);
}
+void rsi_ContextDestroy(Context *rsc) {
+ delete rsc;
+}
+
}
}
@@ -1038,11 +1042,6 @@ RsContext rsContextCreateGL(RsDevice vdev, uint32_t version, RsSurfaceConfig sc)
return rsc;
}
-void rsContextDestroy(RsContext vrsc) {
- Context * rsc = static_cast<Context *>(vrsc);
- delete rsc;
-}
-
RsMessageToClientType rsContextPeekMessage(RsContext vrsc, size_t *receiveLen, uint32_t *subID, bool wait) {
Context * rsc = static_cast<Context *>(vrsc);
return rsc->peekMessageToClient(receiveLen, subID, wait);