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

Commit e122079b authored by Mathias Agopian's avatar Mathias Agopian
Browse files

Temporarily don't return the current buffer in synchronous mode

activate synchronous mode by default.
parent a67932fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
            if (state == BufferSlot::DEQUEUED) {
                dequeuedCount++;
            }
            if (state == BufferSlot::FREE || i == mCurrentTexture) {
            if (state == BufferSlot::FREE /*|| i == mCurrentTexture*/) {
                foundSync = i;
                if (i != mCurrentTexture) {
                    found = i;
+3 −3
Original line number Diff line number Diff line
@@ -505,11 +505,11 @@ TEST_F(SurfaceTextureClientTest, DISABLED_SurfaceTextureSyncModeWaitRetire) {

    ASSERT_EQ(OK, anw->dequeueBuffer(anw.get(), &buf[0]));
    ASSERT_EQ(OK, anw->queueBuffer(anw.get(), buf[0]));
    thread->run();
    ASSERT_EQ(OK, anw->dequeueBuffer(anw.get(), &buf[1]));
    ASSERT_EQ(OK, anw->queueBuffer(anw.get(), buf[1]));
    thread->run();
    ASSERT_EQ(OK, anw->dequeueBuffer(anw.get(), &buf[2]));
    ASSERT_EQ(OK, anw->queueBuffer(anw.get(), buf[2]));
    //ASSERT_EQ(OK, anw->dequeueBuffer(anw.get(), &buf[2]));
    //ASSERT_EQ(OK, anw->queueBuffer(anw.get(), buf[2]));
    thread->bufferDequeued();
    thread->requestExitAndWait();
}