Add getClientTargetProperty API entry.
getClientTargetProperty will give hardware composer the ability to request some
properties of the client target that hardware composer wants. Prior to this
API, the client will does its best to produce the client target of which the
properties are pretty much fixed.
BUG: b/145968912
Test: mmma -j32 hardware/interfaces/graphics/composer/2.4/
Change-Id: I055f46b1eeba1d3e20d6a92a9d50a83e0f1ee694
diff --git a/graphics/composer/2.4/IComposerClient.hal b/graphics/composer/2.4/IComposerClient.hal
index 1b8170b..7e0c33c 100644
--- a/graphics/composer/2.4/IComposerClient.hal
+++ b/graphics/composer/2.4/IComposerClient.hal
@@ -16,6 +16,9 @@
package android.hardware.graphics.composer@2.4;
+import android.hardware.graphics.common@1.2::PixelFormat;
+import android.hardware.graphics.common@1.2::Dataspace;
+import android.hardware.graphics.composer@2.1::IComposerClient.Command;
import IComposerCallback;
import @2.1::Config;
import @2.1::Display;
@@ -56,6 +59,20 @@
AUTO_LOW_LATENCY_MODE = 5,
};
+ enum Command : @2.3::IComposerClient.Command {
+ /**
+ * SET_CLIENT_TARGET_PROPERTY has this pseudo prototype
+ *
+ * This command has the following binary layout in bytes:
+ *
+ * 0 - 3: clientTargetProperty.pixelFormat
+ * 4 - 7: clientTargetProperty.dataspace
+ *
+ * setClientTargetProperty(ClientTargetProperty clientTargetProperty);
+ */
+ SET_CLIENT_TARGET_PROPERTY = 0x105 << @2.1::IComposerClient.Command:OPCODE_SHIFT,
+ };
+
/**
* Supersedes {@link @2.1::IComposerClient.DisplayType}.
*/
@@ -99,6 +116,11 @@
bool seamlessRequired;
};
+ struct ClientTargetProperty {
+ PixelFormat pixelFormat;
+ Dataspace dataspace;
+ };
+
/**
* Provides a IComposerCallback object for the device to call.
*