summaryrefslogtreecommitdiff
path: root/cpp/RenderScript.cpp
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2012-11-06 14:37:19 -0800
committerTim Murray <timmurray@google.com>2012-11-06 14:37:19 -0800
commit7e0acabf072cda5bdff63e502c1e8e4c2727676b (patch)
treee30f4f7d61333d2e62dc635fe3169c3878817974 /cpp/RenderScript.cpp
parent0e92fa3775b3537c29a7a0ca603d892548936038 (diff)
Add support for CPU-only execution in C++ API.
Change-Id: Ifa6c211965eb14bfb9408404971e19827e7f5dc8
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 3160b4d6..fe4057d8 100644
--- a/cpp/RenderScript.cpp
+++ b/cpp/RenderScript.cpp
@@ -54,18 +54,18 @@ RS::~RS() {
mDev = NULL;
}
-bool RS::init() {
- return RS::init(RS_VERSION);
+bool RS::init(bool forceCpu) {
+ return RS::init(RS_VERSION, forceCpu);
}
-bool RS::init(int targetApi) {
+bool RS::init(int targetApi, bool forceCpu) {
mDev = rsDeviceCreate();
if (mDev == 0) {
ALOGE("Device creation failed");
return false;
}
- mContext = rsContextCreate(mDev, 0, targetApi);
+ mContext = rsContextCreate(mDev, 0, targetApi, forceCpu);
if (mContext == 0) {
ALOGE("Context creation failed");
return false;