summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/DisplayDevice.h
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 /services/surfaceflinger/DisplayDevice.h
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 'services/surfaceflinger/DisplayDevice.h')
-rw-r--r--services/surfaceflinger/DisplayDevice.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 499bf8e6a0..a4706701a8 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -78,7 +78,7 @@ public:
const wp<IBinder>& displayToken,
const sp<DisplaySurface>& displaySurface,
const sp<IGraphicBufferProducer>& producer,
- bool supportWideColor);
+ bool supportWideColor, bool supportHdr);
// clang-format on
~DisplayDevice();
@@ -128,6 +128,7 @@ public:
status_t beginFrame(bool mustRecompose) const;
status_t prepareFrame(HWComposer& hwc);
bool getWideColorSupport() const { return mDisplayHasWideColor; }
+ bool getHdrSupport() const { return mDisplayHasHdr; }
void swapBuffers(HWComposer& hwc) const;
@@ -235,6 +236,7 @@ private:
// Initialized by SurfaceFlinger when the DisplayDevice is created.
// Fed to RenderEngine during composition.
bool mDisplayHasWideColor;
+ bool mDisplayHasHdr;
};
struct DisplayDeviceState {