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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index b4630efe80e8..c059973ed437 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -27,6 +27,7 @@
#include <androidfw/Asset.h>
#include <androidfw/AssetManager.h>
#include <androidfw/ResourceTypes.h>
+#include <android-base/macros.h>
#include "jni.h"
#include "JNIHelp.h"
@@ -48,9 +49,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 +1283,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);