Loading rs/jni/android_renderscript_RenderScript.cpp +4 −4 Original line number Original line Diff line number Diff line Loading @@ -1266,10 +1266,10 @@ nAllocationGetSurface(JNIEnv *_env, jobject _this, jlong con, jlong a) ALOGD("nAllocationGetSurface, con(%p), a(%p)", (RsContext)con, (RsAllocation)a); ALOGD("nAllocationGetSurface, con(%p), a(%p)", (RsContext)con, (RsAllocation)a); } } IGraphicBufferProducer *v = (IGraphicBufferProducer *)rsAllocationGetSurface((RsContext)con, ANativeWindow *anw = (ANativeWindow *)rsAllocationGetSurface((RsContext)con, (RsAllocation)a); (RsAllocation)a); sp<IGraphicBufferProducer> bp = v; sp<Surface> surface(static_cast<Surface*>(anw)); v->decStrong(nullptr); sp<IGraphicBufferProducer> bp = surface->getIGraphicBufferProducer(); jobject o = android_view_Surface_createFromIGraphicBufferProducer(_env, bp); jobject o = android_view_Surface_createFromIGraphicBufferProducer(_env, bp); return o; return o; Loading Loading
rs/jni/android_renderscript_RenderScript.cpp +4 −4 Original line number Original line Diff line number Diff line Loading @@ -1266,10 +1266,10 @@ nAllocationGetSurface(JNIEnv *_env, jobject _this, jlong con, jlong a) ALOGD("nAllocationGetSurface, con(%p), a(%p)", (RsContext)con, (RsAllocation)a); ALOGD("nAllocationGetSurface, con(%p), a(%p)", (RsContext)con, (RsAllocation)a); } } IGraphicBufferProducer *v = (IGraphicBufferProducer *)rsAllocationGetSurface((RsContext)con, ANativeWindow *anw = (ANativeWindow *)rsAllocationGetSurface((RsContext)con, (RsAllocation)a); (RsAllocation)a); sp<IGraphicBufferProducer> bp = v; sp<Surface> surface(static_cast<Surface*>(anw)); v->decStrong(nullptr); sp<IGraphicBufferProducer> bp = surface->getIGraphicBufferProducer(); jobject o = android_view_Surface_createFromIGraphicBufferProducer(_env, bp); jobject o = android_view_Surface_createFromIGraphicBufferProducer(_env, bp); return o; return o; Loading