Merge "DisplayDecoration test: destroy layers per display" into main
This commit is contained in:
commit
18f658cde4
1 changed files with 8 additions and 7 deletions
|
@ -2203,13 +2203,13 @@ TEST_P(GraphicsComposerAidlCommandTest, SetLayerCompositionType) {
|
||||||
|
|
||||||
TEST_P(GraphicsComposerAidlCommandTest, DisplayDecoration) {
|
TEST_P(GraphicsComposerAidlCommandTest, DisplayDecoration) {
|
||||||
for (VtsDisplay& display : mDisplays) {
|
for (VtsDisplay& display : mDisplays) {
|
||||||
auto& writer = getWriter(display.getDisplayId());
|
const auto displayId = display.getDisplayId();
|
||||||
|
auto& writer = getWriter(displayId);
|
||||||
const auto [layerStatus, layer] =
|
const auto [layerStatus, layer] =
|
||||||
mComposerClient->createLayer(display.getDisplayId(), kBufferSlotCount, &writer);
|
mComposerClient->createLayer(displayId, kBufferSlotCount, &writer);
|
||||||
EXPECT_TRUE(layerStatus.isOk());
|
ASSERT_TRUE(layerStatus.isOk());
|
||||||
|
|
||||||
const auto [error, support] =
|
const auto [error, support] = mComposerClient->getDisplayDecorationSupport(displayId);
|
||||||
mComposerClient->getDisplayDecorationSupport(display.getDisplayId());
|
|
||||||
|
|
||||||
const auto format = (error.isOk() && support) ? support->format
|
const auto format = (error.isOk() && support) ? support->format
|
||||||
: aidl::android::hardware::graphics::common::PixelFormat::RGBA_8888;
|
: aidl::android::hardware::graphics::common::PixelFormat::RGBA_8888;
|
||||||
|
@ -2229,9 +2229,9 @@ TEST_P(GraphicsComposerAidlCommandTest, DisplayDecoration) {
|
||||||
|
|
||||||
configureLayer(display, layer, Composition::DISPLAY_DECORATION, display.getFrameRect(),
|
configureLayer(display, layer, Composition::DISPLAY_DECORATION, display.getFrameRect(),
|
||||||
display.getCrop());
|
display.getCrop());
|
||||||
writer.setLayerBuffer(display.getDisplayId(), layer, /*slot*/ 0, decorBuffer->handle,
|
writer.setLayerBuffer(displayId, layer, /*slot*/ 0, decorBuffer->handle,
|
||||||
/*acquireFence*/ -1);
|
/*acquireFence*/ -1);
|
||||||
writer.validateDisplay(display.getDisplayId(), ComposerClientWriter::kNoTimestamp,
|
writer.validateDisplay(displayId, ComposerClientWriter::kNoTimestamp,
|
||||||
VtsComposerClient::kNoFrameIntervalNs);
|
VtsComposerClient::kNoFrameIntervalNs);
|
||||||
execute();
|
execute();
|
||||||
if (support) {
|
if (support) {
|
||||||
|
@ -2241,6 +2241,7 @@ TEST_P(GraphicsComposerAidlCommandTest, DisplayDecoration) {
|
||||||
ASSERT_EQ(1, errors.size());
|
ASSERT_EQ(1, errors.size());
|
||||||
EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, errors[0].errorCode);
|
EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, errors[0].errorCode);
|
||||||
}
|
}
|
||||||
|
EXPECT_TRUE(mComposerClient->destroyLayer(displayId, layer, &writer).isOk());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue