Add VTS for setting layer white point

No readback tests as of yet, as that will necessitate a new api to get
the max display brightness, so that we can max out the brightness -> use
well-defined dimming ratios

Bug: 213493262
Test: builds
Change-Id: I0166dc67f4c52919c02ab7abbf47701e6be3d983
This commit is contained in:
Alec Mouri 2022-01-06 13:46:58 -08:00
parent 5b6c2834d4
commit 95e490bf23

View file

@ -1922,6 +1922,27 @@ TEST_P(GraphicsComposerAidlCommandTest, SET_LAYER_PER_FRAME_METADATA) {
EXPECT_TRUE(mComposerClient->destroyLayer(mPrimaryDisplay, layer).isOk());
}
TEST_P(GraphicsComposerAidlCommandTest, setLayerWhitePointNits) {
int64_t layer;
EXPECT_TRUE(mComposerClient->createLayer(mPrimaryDisplay, kBufferSlotCount, &layer).isOk());
mWriter.setLayerWhitePointNits(mPrimaryDisplay, layer, 200.f);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
mWriter.setLayerWhitePointNits(mPrimaryDisplay, layer, 1000.f);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
mWriter.setLayerWhitePointNits(mPrimaryDisplay, layer, 0.f);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
mWriter.setLayerWhitePointNits(mPrimaryDisplay, layer, -1.f);
execute();
ASSERT_TRUE(mReader.takeErrors().empty());
}
TEST_P(GraphicsComposerAidlCommandTest, setActiveConfigWithConstraints) {
Test_setActiveConfigWithConstraints({.delayForChange = 0, .refreshMiss = false});
}