History log of /frameworks/native/libs/gui/BufferItem.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5c6e46353676b4fd647317fde28c413d8ffe3565 11-Jan-2018 Chia-I Wu <olv@google.com> surfaceflinger: always advertise HDR10 when wide color is available

For HWC that already adversises HDR10 support, this has no effect.
Otherwise, SurfaceFlinger will insert HDR10 into HdrCapabilities
when wide color is supported.

SurfaceFlinger simulates HDR10 support by switching the color mode
to DISPLAY_P3 and forcing client composition for HDR10 layers. It
also has a special path to treat RGBA_1010102/BT2020_PQ as
Y410/BT2020_PQ in RenderEngine when the buffer is from media.

Test: manual
Change-Id: Ib5f18e0100f5610ee65218108bdb9843baccbe98
/frameworks/native/libs/gui/BufferItem.cpp
9bad0d7e726e6b264c528a3dd13d0c58fd92c0e1 19-Dec-2017 Courtney Goeltzenleuchter <courtneygo@google.com> Add plumbing for HDR metadata

Allow a ANativeWindow client to send HDR metadata to SurfaceFlinger.
The metadata can be queried with
BufferLayerConsumer::getCurrentHdrMetadata.

Written by Courtney. Updated by olv@.

Bug: 63710530
Test: builds
Change-Id: I23192d4750950664b57863a533bffd72397255b4
/frameworks/native/libs/gui/BufferItem.cpp
0f056f080d4766523a396c6efb3ae224f287e9ca 11-Oct-2016 Brian Anderson <brianderson@google.com> Align properly in BufferItem::getFlattenedSize.

Test: SurfaceFlinger still works.

Change-Id: I7b5ef08d33a18f98d485f57e461604ed65b657f1
/frameworks/native/libs/gui/BufferItem.cpp
3d4039d7a291cd9b6f2dd4b46fcdb576f2db3356 24-Sep-2016 Brian Anderson <brianderson@google.com> Use FenceTime to share fence times and reduce open fds.

FenceTimes are created and shared for each Fence that
FrameTimestampHistory and FrameTracker care about.

On the consumer side, the FenceTimes are also added to
shared timelines that are owned by SurfaceFlinger or
unshared timelines owned by Layer. The timelines are
checked at the end of every frame to minimize the number
of file descriptors open.

On the producer side, the FenceTimes are added to
the ConsumerFrameEventHistory instead, since the timelines
that would be tracked by SurfaceFlinger are not shared
with anyone else in the consumer's process. The timelines
are checked just after a frame is queued to minimize
the number of file descriptors open.

Test: adb shell /data/nativetest/libgui_test/libgui_test
--gtest_filter=*GetFrameTimestamps*

Change-Id: Ifd4301affe1b24705b2bee7608c5a2c09dfb4041
/frameworks/native/libs/gui/BufferItem.cpp
077f38caaf921e394d6819fff4e574c5a07fe4a3 05-Oct-2016 Colin Cross <ccross@android.com> Merge "Fix anonymous struct and union warnings" am: 87e72cb237 am: a3ac6c2b86 am: 86eff80c19
am: ee45b938e8

Change-Id: I3580bd93dca6c863a11435c0fc4fa5bf25f51067
b1f30bae12a0df810a62f819ab3ac680b00768b9 01-Oct-2016 Colin Cross <ccross@android.com> Fix anonymous struct and union warnings

gui/BufferItem.h and android/sensor.h uses anymous structs and nested
anonymous unions, which are GNU extensions. sensor.h uses them as part
of its API, so disable the warnings in libgui, the only module that
tries to use it with -Weverything. BufferItem.h only uses the unioned
fields inside libgui, remove the union and do the 64-bit to 32-bit
slicing manually so libvulkan doesn't need the warnings disabled.

Bug: 31752268
Test: m -j
Change-Id: I92d59b1202f4d6e5419edaa6d27b6e1c50ac0042
/frameworks/native/libs/gui/BufferItem.cpp
bd3577ef5bae7d65e54bddc04f90b619330edb89 21-Jun-2016 Pablo Ceballos <pceballos@google.com> Make sure constructors initialize all members

- Add default constructors to Parcelables that didn't have them and
make sure all members are initialized by the constructors.
- Add missing fields to BufferItem flatten/unflatten.

Change-Id: I9aa83b326dc3aee757762e63be499dc96a74df91
/frameworks/native/libs/gui/BufferItem.cpp
ff95aabbcc6e8606acbd7933c90eeb9b8b382a21 14-Jan-2016 Pablo Ceballos <pceballos@google.com> Add interface for controlling single buffer auto refresh

- Adds a boolean to BufferQueue that controls whether or not auto
refresh is enabled in SurfaceFlinger when in single buffer mode.
- Adds plumbing up to ANativeWindow.
- When enabled, it will cache the shared buffer slot in Surface in
order to prevent the Binder transaction with SurfaceFlinger.

Bug 24940410

Change-Id: I83142afdc00e203f198a32288f071d926f8fda95
/frameworks/native/libs/gui/BufferItem.cpp
23b4abe024ea88c45e0b94c80e1fb537a573b143 08-Jan-2016 Pablo Ceballos <pceballos@google.com> BQ: Improved buffer/slot tracking

- Explicitly track active buffers and unused slots on top of the
already existing tracking for free slots and free buffers.

Change-Id: Ife2678678e96f0eb0b3fb21571058378134bd868
/frameworks/native/libs/gui/BufferItem.cpp
063121849890da78b1ad7fb96c54c795de5d1fd6 08-Oct-2015 Pablo Ceballos <pceballos@google.com> SF: Force refresh when in single buffer mode

- Add a boolean to BufferItem to track whether single buffer mode is
enabled. When it is, force SurfaceFlinger to acquire a new buffer
and refresh on every vsync.

Bug 24940410

Change-Id: Iea67330c416b6fb14500865f98c67f1c12f23197
/frameworks/native/libs/gui/BufferItem.cpp
ccdfd60d79a8b7f1ed6401d0f2e8e29166a10584 08-Oct-2015 Pablo Ceballos <pceballos@google.com> BQ: Add support for single buffer mode

- Adds a single buffer mode to BufferQueue. In this mode designate the
first dequeued buffer as the shared buffer. All calls to dequeue()
and acquire() will then return the shared buffer, allowing the
producer and consumer to share it.
- Modify the buffer slot state tracking. Add a new SHARED state for
the shared buffer in single buffer mode. Also track how many times
a buffer has been dequeued/queued/acquired as it's possible for a
shared buffer to be both dequeued and acquired at the same time, or
dequeued/acquired multiple times. This tracking is needed to know
when to drop the buffer out of the SHARED state after single buffer
mode has been disabled.
- Add plumbing for enabling/disabling single buffer mode from Surface.

Bug 24940410

Change-Id: I3fc550c74bacb5523c049a227111356257386853
/frameworks/native/libs/gui/BufferItem.cpp
60d6922a011fe18c111b8d30fb6ef1f655b6b15e 07-Aug-2015 Pablo Ceballos <pceballos@google.com> libsgui: Change Rect default constructor

The current Rect default constructor initializes to all zeroes. Change
it to initialize to an invalid Rect.

Modify all of the existing invocations of the default constructor to
maintain the existing behavior.

Bug 18173359

Change-Id: Ibbad076f1550a94f56d7b1cf5350071f2022e09a
/frameworks/native/libs/gui/BufferItem.cpp
47f674dfeca31b29810ecb90f1277918b67c4cf8 22-May-2015 Chong Zhang <chz@google.com> fix BufferItem flatten/unflatten alignment

bug: 21370100
Change-Id: Ia3991dc591c176bdbd1d78d1804aa22777525b62
/frameworks/native/libs/gui/BufferItem.cpp
eea6d682b8b0f7081f0fe8fab8feadb16e22b30b 20-Apr-2015 Dan Stoza <stoza@google.com> libui/libgui: Fix errors in parceling

BufferItem and GraphicBuffer were not parceling correctly, which had
not been noticed because the libgui tests (specifically, one that
tests placing a BufferQueue in a separate process from the IGBP/C)
had not been run recently. This change fixes the errors found in
those classes.

Change-Id: Ie224361a534a79115a3481d83ff97f21d154d4f5
/frameworks/native/libs/gui/BufferItem.cpp
5065a55291b67f584d7b0be3fa3cfc4e29a3cd1c 18-Mar-2015 Dan Stoza <stoza@google.com> libgui: Pass surface damage through BufferQueue

This change adds support for passing surface damage all of the way
down from the EGL interface through the consumer side of the
BufferQueue. Depends on system/core change
Ie645e6a52b37b5c1b3be19481e8348570d1aa62c

Bug: 11239309
Change-Id: I4457ea826e9ade4ec187f973851d855b7b93a31b
/frameworks/native/libs/gui/BufferItem.cpp
1c87e474d87d6d1380fb61d476d606b1a2fda1c1 13-Mar-2015 Dan Stoza <stoza@google.com> DO NOT MERGE libgui: Remove IGBC::BufferItem

Removes IGraphicBufferConsumer::BufferItem. Depends on the
following changes:
I187b3a7d05196b6289596afac8fb9a9d4aebff76
I0ddd38df37500cfd6b21d1e768ed14e39c5cd9fc

Cherry-pick of Id1fa56d092188f2cb712768d5d2fc6a9027fb73c

Change-Id: I3edf0db8fba656fd78e18a5a7f1137f0fb6b237d
/frameworks/native/libs/gui/BufferItem.cpp
cf3834db104e0b052056e3a06d46e3f222f0d372 11-Mar-2015 Dan Stoza <stoza@google.com> DO NOT MERGE libgui: Prepare for IGBC::BufferItem removal

Currently, there are two instances of BufferItem: one inside of
IGraphicBufferConsumer, and a standalone one inside of libgui. They
only differ in the name of one of the fields, and we want to remove
the IGBC version. This changes things so that client code may be
incrementally switched over to the libgui version.

This is a squashed commit containing the following changes:
I64f495105f56cbf5803cea4aa6b072ea29b70cf5
I1394e693314429ada93427889f10b7b01c948053
I9c3bc8037fa9438d4d9080b8afb694219ef2f71f
I699ed0a6837076867ca756b28d1ffb2238f7a0d9
Iac8425e1241774304a131da2fb9dec6e82922f13

Change-Id: Ic4d51f5df6dbc70b376d13fceba2335b9bae4f3d
/frameworks/native/libs/gui/BufferItem.cpp
82c6bcc9705eabcaf5b9e45bc81867b0e2d61a02 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.

- Wire up new dataSpace parameter through buffer queue stack
- Update tests to include the parameter
- Switch eglApi to using dataSpace to indicate sRGB gamma/linear
difference
- Remove RAW_SENSOR in favor of RAW16
- Remove use of sRGB format enums
- Add default dataspace to buffer queue core
- Add query for default dataspace

Cherry pick of I070bd2e7c56506055c419004c29e2e3feac725df

Change-Id: I461952389c18051176c6b75e664f20ad369f5760
/frameworks/native/libs/gui/BufferItem.cpp
8dc55396fc9bc425b5e2c82e76a38080f2a655ff 04-Nov-2014 Dan Stoza <stoza@google.com> Add a BufferItem parameter to onFrameAvailable

Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents. Also
adds an onFrameReplaced callback, which is necessary if the consumer
wants to do anything more than simple queue length tracking.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
/frameworks/native/libs/gui/BufferItem.cpp
3e96f1982fda358424b0b75f394cbf7c1794a072 03-Mar-2014 Dan Stoza <stoza@google.com> Change BufferQueue into producer/consumer wrapper

Now that BufferQueue has been split into core + producer + consumer,
rewrite BufferQueue to be a thin layer over a producer and consumer
interface. Eventually, this layer will be deprecated in favor of
only using either the producer or consumer interface, as applicable.

Change-Id: I340ae5f5b633b244fb594615ff52ba50b9e2f7e4
/frameworks/native/libs/gui/BufferItem.cpp
289ade165e60b5f71734d30e535f16eb1f4313ad 28-Feb-2014 Dan Stoza <stoza@google.com> Split BufferQueue into core + producer + consumer

Change-Id: Idc39f1e511d68ce4f02202d35425a419bc0bcd92
/frameworks/native/libs/gui/BufferItem.cpp