Loading graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ package android.hardware.graphics.common; @Backing(type="int") @VintfStability enum Transform { NONE = 0, FLIP_H = 1, FLIP_V = 2, ROT_90 = 4, Loading graphics/common/aidl/android/hardware/graphics/common/Transform.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,11 @@ package android.hardware.graphics.common; @VintfStability @Backing(type="int") enum Transform { /** * Identity transform (i.e. no rotation or flip). */ NONE = 0, /** * Horizontal flip. FLIP_H/FLIP_V is applied before ROT_90. */ Loading graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ interface IComposerClient { int getDisplayVsyncPeriod(long display); android.hardware.graphics.composer3.DisplayContentSample getDisplayedContentSample(long display, long maxFrames, long timestamp); android.hardware.graphics.composer3.DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display); android.hardware.graphics.common.Transform getDisplayPhysicalOrientation(long display); android.hardware.graphics.composer3.HdrCapabilities getHdrCapabilities(long display); int getMaxVirtualDisplayCount(); android.hardware.graphics.composer3.PerFrameMetadataKey[] getPerFrameMetadataKeys(long display); Loading graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl +18 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.hardware.graphics.composer3; import android.hardware.graphics.common.Transform; import android.hardware.graphics.composer3.ClientTargetProperty; import android.hardware.graphics.composer3.ColorMode; import android.hardware.graphics.composer3.CommandResultPayload; Loading Loading @@ -353,6 +354,23 @@ interface IComposerClient { */ DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display); /** * Queries the physical orientation of a display. Orientation 'Transform::NONE' * represents a display that doesn't require any transformation on layers * to be presented at their natural orientation. * * @param display is the display where the physical orientation is queried. * * @return is one of the below values: * Transform::NONE * Transform::ROT_90 * Transform::ROT_180 * Transform::ROT_270 * * @exception EX_BAD_DISPLAY when an invalid display was passed in. */ Transform getDisplayPhysicalOrientation(long display); /** * Returns the high dynamic range (HDR) capabilities of the given display, * which are invariant with regard to the active configuration. Loading graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp +27 −0 Original line number Diff line number Diff line Loading @@ -959,6 +959,33 @@ TEST_P(GraphicsComposerAidlTest, GetDisplayName) { EXPECT_TRUE(mComposerClient->getDisplayName(mPrimaryDisplay, &displayName).isOk()); } TEST_P(GraphicsComposerAidlTest, GetDisplayPhysicalOrientationBadDisplay) { Transform displayOrientation; const auto error = mComposerClient->getDisplayPhysicalOrientation(mInvalidDisplayId, &displayOrientation); EXPECT_FALSE(error.isOk()); ASSERT_EQ(IComposerClient::EX_BAD_DISPLAY, error.getServiceSpecificError()); } TEST_P(GraphicsComposerAidlTest, GetDisplayPhysicalOrientation) { const auto allowedDisplayOrientations = std::array<Transform, 4>{ Transform::NONE, Transform::ROT_90, Transform::ROT_180, Transform::ROT_270, }; Transform displayOrientation; const auto error = mComposerClient->getDisplayPhysicalOrientation(mPrimaryDisplay, &displayOrientation); EXPECT_TRUE(error.isOk()); EXPECT_NE(std::find(allowedDisplayOrientations.begin(), allowedDisplayOrientations.end(), displayOrientation), allowedDisplayOrientations.end()); } TEST_P(GraphicsComposerAidlTest, SetClientTargetSlotCount) { EXPECT_TRUE( mComposerClient->setClientTargetSlotCount(mPrimaryDisplay, kBufferSlotCount).isOk()); Loading Loading
graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ package android.hardware.graphics.common; @Backing(type="int") @VintfStability enum Transform { NONE = 0, FLIP_H = 1, FLIP_V = 2, ROT_90 = 4, Loading
graphics/common/aidl/android/hardware/graphics/common/Transform.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,11 @@ package android.hardware.graphics.common; @VintfStability @Backing(type="int") enum Transform { /** * Identity transform (i.e. no rotation or flip). */ NONE = 0, /** * Horizontal flip. FLIP_H/FLIP_V is applied before ROT_90. */ Loading
graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ interface IComposerClient { int getDisplayVsyncPeriod(long display); android.hardware.graphics.composer3.DisplayContentSample getDisplayedContentSample(long display, long maxFrames, long timestamp); android.hardware.graphics.composer3.DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display); android.hardware.graphics.common.Transform getDisplayPhysicalOrientation(long display); android.hardware.graphics.composer3.HdrCapabilities getHdrCapabilities(long display); int getMaxVirtualDisplayCount(); android.hardware.graphics.composer3.PerFrameMetadataKey[] getPerFrameMetadataKeys(long display); Loading
graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl +18 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.hardware.graphics.composer3; import android.hardware.graphics.common.Transform; import android.hardware.graphics.composer3.ClientTargetProperty; import android.hardware.graphics.composer3.ColorMode; import android.hardware.graphics.composer3.CommandResultPayload; Loading Loading @@ -353,6 +354,23 @@ interface IComposerClient { */ DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display); /** * Queries the physical orientation of a display. Orientation 'Transform::NONE' * represents a display that doesn't require any transformation on layers * to be presented at their natural orientation. * * @param display is the display where the physical orientation is queried. * * @return is one of the below values: * Transform::NONE * Transform::ROT_90 * Transform::ROT_180 * Transform::ROT_270 * * @exception EX_BAD_DISPLAY when an invalid display was passed in. */ Transform getDisplayPhysicalOrientation(long display); /** * Returns the high dynamic range (HDR) capabilities of the given display, * which are invariant with regard to the active configuration. Loading
graphics/composer/aidl/android/hardware/graphics/composer3/vts/functional/VtsHalGraphicsComposer3_TargetTest.cpp +27 −0 Original line number Diff line number Diff line Loading @@ -959,6 +959,33 @@ TEST_P(GraphicsComposerAidlTest, GetDisplayName) { EXPECT_TRUE(mComposerClient->getDisplayName(mPrimaryDisplay, &displayName).isOk()); } TEST_P(GraphicsComposerAidlTest, GetDisplayPhysicalOrientationBadDisplay) { Transform displayOrientation; const auto error = mComposerClient->getDisplayPhysicalOrientation(mInvalidDisplayId, &displayOrientation); EXPECT_FALSE(error.isOk()); ASSERT_EQ(IComposerClient::EX_BAD_DISPLAY, error.getServiceSpecificError()); } TEST_P(GraphicsComposerAidlTest, GetDisplayPhysicalOrientation) { const auto allowedDisplayOrientations = std::array<Transform, 4>{ Transform::NONE, Transform::ROT_90, Transform::ROT_180, Transform::ROT_270, }; Transform displayOrientation; const auto error = mComposerClient->getDisplayPhysicalOrientation(mPrimaryDisplay, &displayOrientation); EXPECT_TRUE(error.isOk()); EXPECT_NE(std::find(allowedDisplayOrientations.begin(), allowedDisplayOrientations.end(), displayOrientation), allowedDisplayOrientations.end()); } TEST_P(GraphicsComposerAidlTest, SetClientTargetSlotCount) { EXPECT_TRUE( mComposerClient->setClientTargetSlotCount(mPrimaryDisplay, kBufferSlotCount).isOk()); Loading