diff options
author | Miao Wang <miaowang@google.com> | 2017-03-09 20:51:50 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-03-09 20:51:50 +0000 |
commit | db889edb1ddc8d032dbbacdb69494eb8573e6ca5 (patch) | |
tree | 37e4766427a26d680ee7a40b63f6e205fe7bb360 /rs | |
parent | 483a424903807f5b9ae836caf35c17600c4e3ce8 (diff) | |
parent | 70fac233fad400031ff4b9986fcd3273d21f71fe (diff) |
Merge changes from topic 'USAGE_IO_INPUT'
am: 70fac233fa
Change-Id: I3f8db9b25a8ccee8ddb596baf5e54a268747de9f
Diffstat (limited to 'rs')
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index c663255d3315..b4630efe80e8 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -1266,10 +1266,10 @@ nAllocationGetSurface(JNIEnv *_env, jobject _this, jlong con, jlong a) ALOGD("nAllocationGetSurface, con(%p), a(%p)", (RsContext)con, (RsAllocation)a); } - IGraphicBufferProducer *v = (IGraphicBufferProducer *)rsAllocationGetSurface((RsContext)con, - (RsAllocation)a); - sp<IGraphicBufferProducer> bp = v; - v->decStrong(nullptr); + ANativeWindow *anw = (ANativeWindow *)rsAllocationGetSurface((RsContext)con, (RsAllocation)a); + + sp<Surface> surface(static_cast<Surface*>(anw)); + sp<IGraphicBufferProducer> bp = surface->getIGraphicBufferProducer(); jobject o = android_view_Surface_createFromIGraphicBufferProducer(_env, bp); return o; |