summaryrefslogtreecommitdiff
path: root/libs/gui/BufferItem.cpp
diff options
context:
space:
mode:
author Chia-I Wu <olv@google.com> 2018-01-11 08:54:38 -0800
committer Chia-I Wu <olv@google.com> 2018-01-22 12:18:24 -0800
commit5c6e46353676b4fd647317fde28c413d8ffe3565 (patch)
tree7dfd0f945db8ab01ab1ebfd7cfa4079a04a6c58b /libs/gui/BufferItem.cpp
parent131d3760a0437fac08ff4cc384640b7ca1802d17 (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 'libs/gui/BufferItem.cpp')
-rw-r--r--libs/gui/BufferItem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gui/BufferItem.cpp b/libs/gui/BufferItem.cpp
index f7409dc344..f50379b3ed 100644
--- a/libs/gui/BufferItem.cpp
+++ b/libs/gui/BufferItem.cpp
@@ -55,7 +55,8 @@ BufferItem::BufferItem() :
mSurfaceDamage(),
mAutoRefresh(false),
mQueuedBuffer(true),
- mIsStale(false) {
+ mIsStale(false),
+ mApi(0) {
}
BufferItem::~BufferItem() {}
@@ -84,6 +85,7 @@ size_t BufferItem::getPodSize() const {
addAligned(size, mAutoRefresh);
addAligned(size, mQueuedBuffer);
addAligned(size, mIsStale);
+ addAligned(size, mApi);
return size;
}
@@ -177,6 +179,7 @@ status_t BufferItem::flatten(
writeAligned(buffer, size, mAutoRefresh);
writeAligned(buffer, size, mQueuedBuffer);
writeAligned(buffer, size, mIsStale);
+ writeAligned(buffer, size, mApi);
return NO_ERROR;
}
@@ -247,6 +250,7 @@ status_t BufferItem::unflatten(
readAligned(buffer, size, mAutoRefresh);
readAligned(buffer, size, mQueuedBuffer);
readAligned(buffer, size, mIsStale);
+ readAligned(buffer, size, mApi);
return NO_ERROR;
}