summaryrefslogtreecommitdiff
path: root/rsContext.h
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2015-05-06 00:43:02 -0700
committerStephen Hines <srhines@google.com>2015-05-06 00:47:53 -0700
commit4c368af7e705f0bcb77fa99495b2e33ef20d2699 (patch)
tree6079ee0f2b88a9279dca0948f199477cff37a621 /rsContext.h
parentc8ed6d305d5adc98367bb3acdd5e2188946fb35b (diff)
downloadrs-4c368af7e705f0bcb77fa99495b2e33ef20d2699.tar.gz
Add a way to link against different driver names.
The existing linker path hard-coded "-lRSDriver" into the command line, but this won't work for partner drivers that have a different implementation loaded. In order to still properly handle use of the CPU driver, this needs to change depending on whether we actually loaded an OVERRIDE_RS_DRIVER or not. Change-Id: I0c4a4f12f5db819b234952bc8f364ac6300f147b
Diffstat (limited to 'rsContext.h')
-rw-r--r--rsContext.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/rsContext.h b/rsContext.h
index 5965caeb..6cb0ed76 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -283,6 +283,11 @@ public:
return mCacheDir;
}
+ // Returns the actual loaded driver's name (like "libRSDriver.so").
+ const char * getDriverName() {
+ return mDriverName;
+ }
+
protected:
@@ -336,6 +341,11 @@ private:
bool mHasSurface;
bool mIsContextLite;
+ // This holds the name of the driver (like "libRSDriver.so").
+ // Since this is always just a static string, we don't have to
+ // allocate, copy, or free any memory here.
+ const char* mDriverName;
+
Vector<ObjectBase *> mNames;
uint64_t mTimers[_RS_TIMER_TOTAL];