diff options
Diffstat (limited to 'rs')
-rw-r--r-- | rs/jni/Android.mk | 3 | ||||
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/rs/jni/Android.mk b/rs/jni/Android.mk index 4040db36c4fb..21438e04f38c 100644 --- a/rs/jni/Android.mk +++ b/rs/jni/Android.mk @@ -18,7 +18,8 @@ LOCAL_SHARED_LIBRARIES := \ libgui \ libjnigraphics -LOCAL_STATIC_LIBRARIES := +LOCAL_HEADER_LIBRARIES := \ + libbase_headers LOCAL_C_INCLUDES += \ $(JNI_H_INCLUDE) \ 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); |