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
diff --git a/services/surfaceflinger/BufferLayerConsumer.h b/services/surfaceflinger/BufferLayerConsumer.h
index f473390..a0272b3 100644
--- a/services/surfaceflinger/BufferLayerConsumer.h
+++ b/services/surfaceflinger/BufferLayerConsumer.h
@@ -138,6 +138,9 @@
     // must be called from SF main thread
     const Region& getSurfaceDamage() const;
 
+    // getCurrentApi retrieves the API which queues the current buffer.
+    int getCurrentApi() const;
+
     // See GLConsumer::setDefaultBufferSize.
     status_t setDefaultBufferSize(uint32_t width, uint32_t height);
 
@@ -337,6 +340,8 @@
     // The portion of this surface that has changed since the previous frame
     Region mCurrentSurfaceDamage;
 
+    int mCurrentApi;
+
     uint32_t mDefaultWidth, mDefaultHeight;
 
     // mFilteringEnabled indicates whether the transform matrix is computed for