summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver/rsdAllocation.cpp2
-rw-r--r--rsContext.cpp18
-rw-r--r--rsContext.h17
-rwxr-xr-xupdate_rs_prebuilts.sh15
4 files changed, 36 insertions, 16 deletions
diff --git a/driver/rsdAllocation.cpp b/driver/rsdAllocation.cpp
index 34670867..94efab24 100644
--- a/driver/rsdAllocation.cpp
+++ b/driver/rsdAllocation.cpp
@@ -553,7 +553,7 @@ void rsdAllocationDestroy(const Context *rsc, Allocation *alloc) {
if (nw) {
GraphicBufferMapper &mapper = GraphicBufferMapper::get();
mapper.unlock(drv->wndBuffer->handle);
- int32_t r = nw->queueBuffer(nw, drv->wndBuffer, -1);
+ int32_t r = nw->cancelBuffer(nw, drv->wndBuffer, -1);
drv->wndSurface = nullptr;
native_window_api_disconnect(nw, NATIVE_WINDOW_API_CPU);
diff --git a/rsContext.cpp b/rsContext.cpp
index 29b4036f..fba06cd9 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -459,8 +459,26 @@ Context::Context() {
mContextType = RS_CONTEXT_TYPE_NORMAL;
mSynchronous = false;
mFatalErrorOccured = false;
+
+ memset(mCacheDir, 0, sizeof(mCacheDir));
+#ifdef RS_COMPATIBILITY_LIB
+ memset(nativeLibDir, 0, sizeof(nativeLibDir));
+#endif
}
+void Context::setCacheDir(const char * cacheDir_arg, uint32_t length) {
+ if (!hasSetCacheDir) {
+ if (length <= PATH_MAX) {
+ memcpy(mCacheDir, cacheDir_arg, length);
+ mCacheDir[length] = 0;
+ hasSetCacheDir = true;
+ } else {
+ setError(RS_ERROR_BAD_VALUE, "Invalid path");
+ }
+ }
+}
+
+
Context * Context::createContext(Device *dev, const RsSurfaceConfig *sc,
RsContextType ct, uint32_t flags) {
Context * rsc = new Context();
diff --git a/rsContext.h b/rsContext.h
index 6cb0ed76..c6b70797 100644
--- a/rsContext.h
+++ b/rsContext.h
@@ -258,6 +258,7 @@ public:
if (!hasSetNativeLibDir) {
if (length <= PATH_MAX) {
memcpy(nativeLibDir, libDir, length);
+ nativeLibDir[length] = 0;
hasSetNativeLibDir = true;
} else {
setError(RS_ERROR_BAD_VALUE, "Invalid path");
@@ -269,18 +270,12 @@ public:
}
#endif
- void setCacheDir(const char * cacheDir_arg, uint32_t length) {
- if (!hasSetCacheDir) {
- if (length <= PATH_MAX) {
- memcpy(mCacheDir, cacheDir_arg, length);
- hasSetCacheDir = true;
- } else {
- setError(RS_ERROR_BAD_VALUE, "Invalid path");
- }
- }
- }
+ void setCacheDir(const char * cacheDir_arg, uint32_t length);
const char * getCacheDir() {
- return mCacheDir;
+ if (hasSetCacheDir) {
+ return mCacheDir;
+ }
+ return nullptr;
}
// Returns the actual loaded driver's name (like "libRSDriver.so").
diff --git a/update_rs_prebuilts.sh b/update_rs_prebuilts.sh
index 2526384e..89d7ac1b 100755
--- a/update_rs_prebuilts.sh
+++ b/update_rs_prebuilts.sh
@@ -161,14 +161,21 @@ libc++.$SONAME
libLLVM.$SONAME
"
+TOOLS_LIB32="libc++.$SONAME"
+
for a in $TOOLS_BIN; do
- cp $ANDROID_HOST_OUT/bin/$a tools/$SHORT_OSNAME/
- strip tools/$SHORT_OSNAME/$a
+ cp $ANDROID_HOST_OUT/bin/$a tools/$SHORT_OSNAME/bin
+ strip tools/$SHORT_OSNAME/bin/$a
done
for a in $TOOLS_LIB; do
- cp $HOST_LIB64_DIR/$a tools/$SHORT_OSNAME/
- strip tools/$SHORT_OSNAME/$a
+ cp $HOST_LIB64_DIR/$a tools/$SHORT_OSNAME/lib64
+ strip tools/$SHORT_OSNAME/lib64/$a
+done
+
+for a in $TOOLS_LIB32; do
+ cp $HOST_LIB_DIR/$a tools/$SHORT_OSNAME/lib
+ strip tools/$SHORT_OSNAME/lib/$a
done
if [ $DARWIN -eq 0 ]; then