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

Commit 87318d63 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "BLASTBufferQueue JNI: Call getSurface"

parents fb7eb2e6 23779a7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ static void nativeDestroy(JNIEnv* env, jclass clazz, jlong ptr) {

static jobject nativeGetSurface(JNIEnv* env, jclass clazz, jlong ptr) {
    sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr);
    return android_view_Surface_createFromIGraphicBufferProducer(env, queue->getIGraphicBufferProducer());
    return android_view_Surface_createFromSurface(env, queue->getSurface());
}

static void nativeSetNextTransaction(JNIEnv* env, jclass clazz, jlong ptr, jlong transactionPtr) {
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ static jlong nativeGetFromBlastBufferQueue(JNIEnv* env, jclass clazz, jlong nati
        return nativeObject;
    }

    sp<Surface> surface(new Surface(bufferProducer, true));
    sp<Surface> surface = queue->getSurface();
    if (surface != NULL) {
        surface->incStrong(&sRefBaseOwner);
    }