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

Commit c6c14427 authored by Carlos Martinez Romero's avatar Carlos Martinez Romero Committed by Android (Google) Code Review
Browse files

Merge "Remove redundant connect methods in Surface." into main

parents aa9dd7d9 4383a1a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -555,8 +555,8 @@ status_t Camera3OutputStream::configureConsumerQueueLocked(bool allowPreviewResp
    // Configure consumer-side ANativeWindow interface. The listener may be used
    // to notify buffer manager (if it is used) of the returned buffers.
    res = mConsumer->connect(NATIVE_WINDOW_API_CAMERA,
            /*reportBufferRemoval*/true,
            /*listener*/mBufferProducerListener);
            /*listener*/mBufferProducerListener,
            /*reportBufferRemoval*/true);
    if (res != OK) {
        ALOGE("%s: Unable to connect to native window for stream %d",
                __FUNCTION__, mId);
+2 −2
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ TEST_F(Camera3StreamSplitterTest, TestWithoutSurfaces_NoBuffersConsumed) {
                                     kHeight, kFormat, &consumer, kDynamicRangeProfile));

    sp<TestSurfaceListener> surfaceListener = sp<TestSurfaceListener>::make();
    EXPECT_EQ(OK, consumer->connect(NATIVE_WINDOW_API_CAMERA, false, surfaceListener));
    EXPECT_EQ(OK, consumer->connect(NATIVE_WINDOW_API_CAMERA, surfaceListener, false));

    sp<GraphicBuffer> buffer = new GraphicBuffer(kWidth, kHeight, kFormat, kProducerUsage);
    EXPECT_EQ(OK, consumer->attachBuffer(buffer->getNativeBuffer()));
@@ -137,7 +137,7 @@ TEST_F(Camera3StreamSplitterTest, TestProcessSingleBuffer) {
                                     kConsumerUsage, kProducerUsage, kHalMaxBuffers, kWidth,
                                     kHeight, kFormat, &inputSurface, kDynamicRangeProfile));
    sp<TestSurfaceListener> surfaceListener = sp<TestSurfaceListener>::make();
    EXPECT_EQ(OK, inputSurface->connect(NATIVE_WINDOW_API_CAMERA, false, surfaceListener));
    EXPECT_EQ(OK, inputSurface->connect(NATIVE_WINDOW_API_CAMERA, surfaceListener, false));
    // TODO: Do this with the surface itself once the API is available.
    EXPECT_EQ(OK, inputSurface->getIGraphicBufferProducer()->allowAllocation(false));