Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f4a9171 authored by Miao Wang's avatar Miao Wang Committed by android-build-merger
Browse files

Merge changes from topic 'USAGE_IO_INPUT' am: 70fac233 am: db889edb

am: dbe0a73e

Change-Id: Ib4fd8b57711735ad9dc59142ade2757839918185
parents a49d4771 dbe0a73e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;