BLASTBufferQueue JNI: Call getSurface
BLASTBufferQueue now uses a Surface subclass, and so we need to call getSurface instead of using the BufferProducer and constructing a Surface in JNI. Bug: 168504871 Test: Existing tests pass Change-Id: Ic11fb96050264310ae967eeadb0ed5de1027c866
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user