Merge "BLASTBufferQueue JNI: Call getSurface"

This commit is contained in:
Rob Carr
2020-10-20 23:40:14 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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);
}