summaryrefslogtreecommitdiff
path: root/cpp/RenderScript.cpp
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-03-10 15:29:40 -0700
committerMiao Wang <miaowang@google.com>2015-03-30 12:16:28 -0700
commite5428e661ce6f9d24f838cab0a8fb0fa8c76dbca (patch)
tree63202ff218aff023d7b0adb5e34cb28dff992287 /cpp/RenderScript.cpp
parentc3851d58e6f0a97a3f5239d78515acd2be47b507 (diff)
Update RenderScript C++ API
- Add Copy3DRangeTo API - Add AutoPadding & unPadding for CopyTo and CopyFrom APIs - Add IntrinsicResize Change-Id: I1138225f8a7b738929a09636bf2669f5d68b0c7d
Diffstat (limited to 'cpp/RenderScript.cpp')
-rw-r--r--cpp/RenderScript.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/RenderScript.cpp b/cpp/RenderScript.cpp
index de22dea6..2a041090 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -80,14 +80,14 @@ bool RS::init(std::string name, uint32_t flags) {
// this will only open API 19+ libRS
// because that's when we changed libRS to extern "C" entry points
-static bool loadSO(const char* filename) {
+static bool loadSO(const char* filename, int targetApi) {
void* handle = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
if (handle == nullptr) {
ALOGV("couldn't dlopen %s, %s", filename, dlerror());
return false;
}
- if (loadSymbols(handle, *RS::dispatch) == false) {
+ if (loadSymbols(handle, *RS::dispatch, targetApi) == false) {
ALOGV("%s init failed!", filename);
return false;
}
@@ -119,10 +119,10 @@ bool RS::initDispatch(int targetApi) {
// attempt to load libRS, load libRSSupport on failure
// if property is set, proceed directly to libRSSupport
if (getProp("debug.rs.forcecompat") == 0) {
- usingNative = loadSO("libRS.so");
+ usingNative = loadSO("libRS.so", targetApi);
}
if (usingNative == false) {
- if (loadSO("libRSSupport.so") == false) {
+ if (loadSO("libRSSupport.so", targetApi) == false) {
ALOGE("Failed to load libRS.so and libRSSupport.so");
goto error;
}