diff options
author | Tim Murray <timmurray@google.com> | 2014-01-15 23:20:36 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-01-15 23:20:36 +0000 |
commit | 37f5a4bb55bc85aa70ccb8b61efe99831066a5ca (patch) | |
tree | 847eb5ad6da659b255b13c0dbe9d1001692dcc7c /cpp | |
parent | 76873f6d02d7cc0b806d0b8b418ca77d515052a9 (diff) | |
parent | a9861e8fe76a0252c0b5105c4796590f988a1030 (diff) | |
download | rs-37f5a4bb55bc85aa70ccb8b61efe99831066a5ca.tar.gz |
am a9861e8f: am 9ee891e3: am f171923b: Merge "Fix NDK API on old devices."
* commit 'a9861e8fe76a0252c0b5105c4796590f988a1030':
Fix NDK API on old devices.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/Android.mk | 9 | ||||
-rw-r--r-- | cpp/RenderScript.cpp | 7 | ||||
-rw-r--r-- | cpp/rsCppInternal.h | 1 |
3 files changed, 13 insertions, 4 deletions
diff --git a/cpp/Android.mk b/cpp/Android.mk index b32d7f13..a5d6a691 100644 --- a/cpp/Android.mk +++ b/cpp/Android.mk @@ -52,11 +52,15 @@ include $(CLEAR_VARS) LOCAL_CLANG := true LOCAL_CFLAGS += $(local_cflags_for_rs_cpp) +LOCAL_SDK_VERSION := 8 +LOCAL_CFLAGS += -DRS_COMPATIBILITY_LIB + LOCAL_SRC_FILES := $(rs_cpp_SRC_FILES) +LOCAL_SRC_FILES += ../rsCompatibilityLib.cpp + LOCAL_STATIC_LIBRARIES := \ libz \ - libcutils \ libutils \ liblog \ libstlport_static @@ -68,7 +72,8 @@ LOCAL_MODULE:= libRScpp_static LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES += frameworks/rs -LOCAL_C_INCLUDES += external/stlport/stlport bionic/ bionic/libstdc++/include LOCAL_C_INCLUDES += $(intermediates) +LOCAL_NDK_STL_VARIANT := stlport_static + include $(BUILD_STATIC_LIBRARY) diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp index 3a75ffe0..04f1e88e 100644 --- a/cpp/RenderScript.cpp +++ b/cpp/RenderScript.cpp @@ -23,11 +23,15 @@ #include "rsCppInternal.h" #include <dlfcn.h> +#include <unistd.h> -#if !defined(RS_SERVER) && defined(HAVE_ANDROID_OS) +#if !defined(RS_SERVER) && !defined(RS_COMPATIBILITY_LIB) && defined(HAVE_ANDROID_OS) #include <cutils/properties.h> +#else +#include "rsCompatibilityLib.h" #endif + using namespace android; using namespace RSC; @@ -473,7 +477,6 @@ bool RS::init(std::string &name, int targetApi, uint32_t flags) { } mCacheDir = name; - mCacheDir += "/com.android.renderscript.cache/"; mDev = RS::dispatch->DeviceCreate(); if (mDev == 0) { diff --git a/cpp/rsCppInternal.h b/cpp/rsCppInternal.h index 904c5abf..ae43d476 100644 --- a/cpp/rsCppInternal.h +++ b/cpp/rsCppInternal.h @@ -17,6 +17,7 @@ #ifndef ANDROID_RS_CPP_INTERNAL_H #define ANDROID_RS_CPP_INTERNAL_H +#define LOG_TAG "rsC++" #include "rsCppUtils.h" #define tryDispatch(rs, dispatch) \ |