diff options
author | 2018-01-11 08:54:38 -0800 | |
---|---|---|
committer | 2018-01-22 12:18:24 -0800 | |
commit | 5c6e46353676b4fd647317fde28c413d8ffe3565 (patch) | |
tree | 7dfd0f945db8ab01ab1ebfd7cfa4079a04a6c58b /services/surfaceflinger/BufferLayerConsumer.cpp | |
parent | 131d3760a0437fac08ff4cc384640b7ca1802d17 (diff) |
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
Diffstat (limited to 'services/surfaceflinger/BufferLayerConsumer.cpp')
-rw-r--r-- | services/surfaceflinger/BufferLayerConsumer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/surfaceflinger/BufferLayerConsumer.cpp b/services/surfaceflinger/BufferLayerConsumer.cpp index 8f5c9c740b..4d9b43f52e 100644 --- a/services/surfaceflinger/BufferLayerConsumer.cpp +++ b/services/surfaceflinger/BufferLayerConsumer.cpp @@ -68,6 +68,7 @@ BufferLayerConsumer::BufferLayerConsumer(const sp<IGraphicBufferConsumer>& bq, R mCurrentFrameNumber(0), mCurrentTransformToDisplayInverse(false), mCurrentSurfaceDamage(), + mCurrentApi(0), mDefaultWidth(1), mDefaultHeight(1), mFilteringEnabled(true), @@ -346,6 +347,7 @@ status_t BufferLayerConsumer::updateAndReleaseLocked(const BufferItem& item, mCurrentFrameNumber = item.mFrameNumber; mCurrentTransformToDisplayInverse = item.mTransformToDisplayInverse; mCurrentSurfaceDamage = item.mSurfaceDamage; + mCurrentApi = item.mApi; computeCurrentTransformMatrixLocked(); @@ -469,6 +471,11 @@ const Region& BufferLayerConsumer::getSurfaceDamage() const { return mCurrentSurfaceDamage; } +int BufferLayerConsumer::getCurrentApi() const { + Mutex::Autolock lock(mMutex); + return mCurrentApi; +} + sp<GraphicBuffer> BufferLayerConsumer::getCurrentBuffer(int* outSlot) const { Mutex::Autolock lock(mMutex); |