Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f803e5a authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge "Add sdr white point information to composer3"

parents 8076e436 10bccc3c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,4 +72,5 @@ enum Command {
  SET_LAYER_PER_FRAME_METADATA_BLOBS = 50593792,
  SET_CLIENT_TARGET_PROPERTY = 17104896,
  SET_LAYER_GENERIC_METADATA = 68026368,
  SET_LAYER_WHITE_POINT_NITS = 50659328,
}
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ interface IComposerClient {
  void destroyVirtualDisplay(long display);
  android.hardware.graphics.composer3.ExecuteCommandsStatus executeCommands(int inLength, in android.hardware.common.NativeHandle[] inHandles);
  int getActiveConfig(long display);
  void getClientTargetSupport(long display, int width, int height, android.hardware.graphics.common.PixelFormat format, android.hardware.graphics.common.Dataspace dataspace);
  void getClientTargetSupport(long display, int width, int height, in android.hardware.graphics.composer3.ClientTargetProperty clientTargetProperty);
  android.hardware.graphics.composer3.ColorMode[] getColorModes(long display);
  float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
  int getDisplayAttribute(long display, int config, android.hardware.graphics.composer3.DisplayAttribute attribute);
+23 −1
Original line number Diff line number Diff line
@@ -689,8 +689,16 @@ enum Command {
     *
     *     0 - 3: clientTargetProperty.pixelFormat
     *     4 - 7: clientTargetProperty.dataspace
     *     8 - 11: whitePointNits
     *
     *   setClientTargetProperty(ClientTargetProperty clientTargetProperty);
     * The white point parameter describes the intended white point of the client target buffer.
     * When client composition blends both HDR and SDR content, the client must composite to the
     * brightness space as specified by the hardware composer. This is so that adjusting the real
     * display brightness may be applied atomically with compensating the client target output. For
     * instance, client-compositing a list of SDR layers requires dimming the brightness space of
     * the SDR buffers when an HDR layer is simultaneously device-composited.
     *
     *   setClientTargetProperty(ClientTargetProperty clientTargetProperty, float whitePointNits);
     */
    SET_CLIENT_TARGET_PROPERTY = 0x105 << OPCODE_SHIFT,

@@ -738,4 +746,18 @@ enum Command {
     *        corresponding to the key as described above
     */
    SET_LAYER_GENERIC_METADATA = 0x40e << OPCODE_SHIFT,

    /**
     * SET_LAYER_WHITE_POINT_NITS has this pseudo prototype
     *
     *   setLayerWhitePointNits(float sdrWhitePointNits);
     *
     * Sets the desired white point for the layer. This is intended to be used when presenting
     * an SDR layer alongside HDR content. The HDR content will be presented at the display
     * brightness in nits, and accordingly SDR content shall be dimmed to the desired white point
     * provided.
     *
     * @param whitePointNits is the white point in nits.
     */
    SET_LAYER_WHITE_POINT_NITS = 0x305 << OPCODE_SHIFT,
}
+3 −6
Original line number Diff line number Diff line
@@ -200,15 +200,12 @@ interface IComposerClient {
     * @param display is the display to query.
     * @param width is the client target width in pixels.
     * @param height is the client target height in pixels.
     * @param format is the client target format.
     * @param dataspace is the client target dataspace, as described in
     *     setLayerDataspace.
     * @param clientTargetProperty is the client target format and dataspace.
     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
     * @exception EX_UNSUPPORTED when the given configuration is not supported.
     */
    void getClientTargetSupport(long display, int width, int height,
            android.hardware.graphics.common.PixelFormat format,
            android.hardware.graphics.common.Dataspace dataspace);
    void getClientTargetSupport(
            long display, int width, int height, in ClientTargetProperty clientTargetProperty);

    /**
     * Returns the color modes supported on this display.