Merge changes I2b06ad79,I8b48188d

* changes:
  composer: add SKIP_VALIDATE to AIDL
  composer: remove getClientTargetSupport
This commit is contained in:
Ady Abraham
2021-10-21 00:19:30 +00:00
committed by Android (Google) Code Review
5 changed files with 15 additions and 20 deletions

View File

@@ -38,4 +38,5 @@ enum Capability {
SIDEBAND_STREAM = 1,
SKIP_CLIENT_COLOR_TRANSFORM = 2,
PRESENT_FENCE_IS_NOT_RELIABLE = 3,
SKIP_VALIDATE = 4,
}

View File

@@ -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);

View File

@@ -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,
}

View File

@@ -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.
*

View File

@@ -70,6 +70,9 @@ static_assert(
static_cast<aidl::android::hardware::graphics::composer3::Capability>(
::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<aidl::android::hardware::graphics::composer3::Capability>(4));
static_assert(aidl::android::hardware::graphics::composer3::LayerRequest::CLEAR_CLIENT_TARGET ==
static_cast<aidl::android::hardware::graphics::composer3::LayerRequest>(