diff options
author | Miao Wang <miaowang@google.com> | 2017-04-03 16:42:03 -0700 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2017-04-04 05:59:19 +0000 |
commit | f35ddc9843af8979944a41237e3ad72248894c26 (patch) | |
tree | 64ad2358d9535e7db7c71579f368b103c254fbb9 | |
parent | f2764a4aedf5daea911900f99d5cd0a314185123 (diff) |
[RenderScript] Connect ANativeWindow to BufferQueue before calling
AllocationSetSurface.
Bug: 34334222
Test: mm, boot Sailfish, CTS pass and ImageProcessingJB works well.
Change-Id: I77e7fb69987a347862286299622343b4f7879ab0
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index c532efb79345..0acbb0258944 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -1282,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); |