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

Commit 3edd3d87 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Add comment for BLASTBufferQueue buffer barriers

Bug: 402059710
Test: presubmit
Flag: EXEMPT documentation
Change-Id: Ia3aac0ede2f2ad462460539443f7b38b7b529576
parent c6cf7afe
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -230,6 +230,14 @@ private:
    ui::Size mSize GUARDED_BY(mMutex);
    ui::Size mRequestedSize GUARDED_BY(mMutex);
    int32_t mFormat GUARDED_BY(mMutex);

    // Buffers may reach SurfaceFlinger out of order. Buffer barriers are used to ensure that
    // a buffer with a given frame number is only applied in SurfaceFlinger once a previous buffer
    // with a lower frame number is applied. Transactions that are not applied by BLASTBufferQueue
    // always wait on the last buffer applied by BLASTBufferQueue using these barriers.
    // Barriers are set on a layer, and are not shared across layers. This means if the layer
    // backing this BLASTBufferQueue changes, the barrier will be invalid. This flag is used to
    // track when the layer is changed so the barrier can be skipped.
    bool mSetBufferBarrier GUARDED_BY(mMutex) = false;

    // Keep a copy of the current picture profile handle, so it can be moved to a new