summaryrefslogtreecommitdiff
path: root/rs/jni/android_renderscript_RenderScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rs/jni/android_renderscript_RenderScript.cpp')
-rw-r--r--rs/jni/android_renderscript_RenderScript.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index b4630efe80e8..0acbb0258944 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -48,9 +48,6 @@ static constexpr bool kLogApi = false;
using namespace android;
-template <typename... T>
-void UNUSED(T... t) {}
-
#define PER_ARRAY_TYPE(flag, fnc, readonly, ...) { \
jint len = 0; \
void *ptr = nullptr; \
@@ -1285,7 +1282,9 @@ nAllocationSetSurface(JNIEnv *_env, jobject _this, jlong con, jlong alloc, jobje
ANativeWindow *anw = nullptr;
if (sur != 0) {
+ // Connect the native window handle to buffer queue.
anw = ANativeWindow_fromSurface(_env, sur);
+ native_window_api_connect(anw, NATIVE_WINDOW_API_CPU);
}
rsAllocationSetSurface((RsContext)con, (RsAllocation)alloc, anw);