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

Commit 6c161bd7 authored by Ian Elliott's avatar Ian Elliott
Browse files

Have the Surface class track the buffer age.

This change corresponds to a change between the Surface and
BufferQueueProducer classes.

Have the Surface class track the buffer age, so that Surface::query()
can return the buffer age without having to use a binder call to
BufferQueueProducer::query().  The idea is for
BufferQueueProducer::dequeueBuffer() to return the value, which the
Surface class will cache for later use by Surface::query().

Bug: b/27903668
Test: Use systrace to no ensure query binder call after dequeueBuffer.
Change-Id: I78ff3d2d639111705c25a92f3672b7e6d0fac19f
(cherry picked from commit ee9ddeff)
parent 19d05412
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -64,9 +64,8 @@ Return<void> TWGraphicBufferProducer::dequeueBuffer(
    sp<Fence> fence;
    ::android::FrameEventHistoryDelta outTimestamps;
    status_t status = mBase->dequeueBuffer(
            &slot, &fence,
            width, height,
            static_cast<::android::PixelFormat>(format), usage,
        &slot, &fence, width, height,
        static_cast<::android::PixelFormat>(format), usage, nullptr,
        getFrameTimestamps ? &outTimestamps : nullptr);
    hidl_handle tFence;
    FrameEventHistoryDelta tOutTimestamps;