summaryrefslogtreecommitdiff
path: root/rsApiContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rsApiContext.cpp')
-rw-r--r--rsApiContext.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/rsApiContext.cpp b/rsApiContext.cpp
index a5c7c3fd..8cb29930 100644
--- a/rsApiContext.cpp
+++ b/rsApiContext.cpp
@@ -24,8 +24,19 @@
using namespace android;
using namespace android::renderscript;
+/*
+ * This global will be found by the debugger and will have its value flipped.
+ * It's independent of the Context class to allow the debugger to do the above
+ * without knowing the type makeup. This allows the debugger to be attached at
+ * an earlier stage.
+ */
+extern "C" int gDebuggerPresent = 0;
+
extern "C" RsContext rsContextCreate(RsDevice vdev, uint32_t version, uint32_t sdkVersion,
RsContextType ct, uint32_t flags) {
+ if (!gInternalDebuggerPresent) {
+ gInternalDebuggerPresent = &gDebuggerPresent;
+ }
//ALOGV("rsContextCreate dev=%p", vdev);
Device * dev = static_cast<Device *>(vdev);
Context *rsc = Context::createContext(dev, nullptr, ct, flags);