diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl index 557b3f8b77..9c49583fd2 100644 --- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl +++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl @@ -38,4 +38,5 @@ enum Capability { SIDEBAND_STREAM = 1, SKIP_CLIENT_COLOR_TRANSFORM = 2, PRESENT_FENCE_IS_NOT_RELIABLE = 3, + SKIP_VALIDATE = 4, } diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl index 8824f5a80f..5c37018910 100644 --- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl +++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl @@ -40,7 +40,6 @@ 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, 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); diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl index 028b6f58d4..ea619aeaf3 100644 --- a/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl +++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl @@ -46,4 +46,15 @@ enum Capability { * representation of the actual present time of a frame. */ PRESENT_FENCE_IS_NOT_RELIABLE = 3, + /** + * Specifies that a device is able to skip the validateDisplay call before + * receiving a call to presentDisplay. The client will always skip + * validateDisplay and try to call presentDisplay regardless of the changes + * in the properties of the layers. If the device returns anything else than + * no error, it will call validateDisplay then presentDisplay again. + * For this capability to be worthwhile the device implementation of + * presentDisplay should fail as fast as possible in the case a + * validateDisplay step is needed. + */ + SKIP_VALIDATE = 4, } diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl index 20a6ffc934..2a9545dfdd 100644 --- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl +++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl @@ -188,25 +188,6 @@ interface IComposerClient { */ int getActiveConfig(long display); - /** - * Returns whether a client target with the given properties can be - * handled by the device. - * - * This function must return true for a client target with width and - * height equal to the active display configuration dimensions, - * PixelFormat::RGBA_8888, and Dataspace::UNKNOWN. It is not required to - * return true for any other configuration. - * - * @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 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, in ClientTargetProperty clientTargetProperty); - /** * Returns the color modes supported on this display. * diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp index a593e906b8..d59190d811 100644 --- a/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp +++ b/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp @@ -70,6 +70,9 @@ static_assert( static_cast( ::android::hardware::graphics::composer::V2_1::IComposer::Capability:: PRESENT_FENCE_IS_NOT_RELIABLE)); +// HWC2_CAPABILITY_SKIP_VALIDATE was never defined for HIDL, so we just hardcode its value +static_assert(aidl::android::hardware::graphics::composer3::Capability::SKIP_VALIDATE == + static_cast(4)); static_assert(aidl::android::hardware::graphics::composer3::LayerRequest::CLEAR_CLIENT_TARGET == static_cast(