From bf484a6adb707ea1eb6a092e39c86bd8f72a35f4 Mon Sep 17 00:00:00 2001 From: Snild Dolkow Date: Thu, 16 Sep 2021 10:20:45 +0200 Subject: [PATCH] Revert "VTS: Test that configs in a group differ only by vsync period" This reverts commit 6f36dd6e31ac1c2d62cd9283a4d07c7c684e5872. Differing only by vsync period was not a requirement on Android R, and it shouldn't be added after-the-fact to an existing HAL version. There are devices on the market that switch seamlessly between configs that differ in resolution/dpi, and therefore have those configs in a common group. Bug: 200184776 Change-Id: Id0bfc67e55d5139fddb2b359cabafd9281c33734 --- .../VtsHalGraphicsComposerV2_4TargetTest.cpp | 55 ------------------- 1 file changed, 55 deletions(-) diff --git a/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp b/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp index 5aceda721e..b071f71e85 100644 --- a/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp +++ b/graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include @@ -317,59 +315,6 @@ TEST_P(GraphicsComposerHidlTest, GetDisplayAttribute_2_4) { } } -TEST_P(GraphicsComposerHidlTest, GetDisplayAttribute_2_4_ConfigsInAGroupDifferOnlyByVsyncPeriod) { - struct Resolution { - int32_t width, height; - }; - struct Dpi { - int32_t x, y; - }; - for (const auto& display : mDisplays) { - std::vector configs = mComposerClient->getDisplayConfigs(display.get()); - std::unordered_map configGroupToResolutionMap; - std::unordered_map configGroupToDpiMap; - for (auto config : configs) { - const auto configGroup = mComposerClient->getDisplayAttribute_2_4( - display.get(), config, IComposerClient::Attribute::CONFIG_GROUP); - const auto width = mComposerClient->getDisplayAttribute_2_4( - display.get(), config, IComposerClient::Attribute::WIDTH); - const auto height = mComposerClient->getDisplayAttribute_2_4( - display.get(), config, IComposerClient::Attribute::HEIGHT); - if (configGroupToResolutionMap.find(configGroup) == configGroupToResolutionMap.end()) { - configGroupToResolutionMap[configGroup] = {width, height}; - } - EXPECT_EQ(configGroupToResolutionMap[configGroup].width, width); - EXPECT_EQ(configGroupToResolutionMap[configGroup].height, height); - - int32_t dpiX = -1; - mComposerClient->getRaw()->getDisplayAttribute_2_4( - display.get(), config, IComposerClient::Attribute::DPI_X, - [&](const auto& tmpError, const auto& value) { - if (tmpError == Error::NONE) { - dpiX = value; - } - }); - int32_t dpiY = -1; - mComposerClient->getRaw()->getDisplayAttribute_2_4( - display.get(), config, IComposerClient::Attribute::DPI_Y, - [&](const auto& tmpError, const auto& value) { - if (tmpError == Error::NONE) { - dpiY = value; - } - }); - if (dpiX == -1 && dpiY == -1) { - continue; - } - - if (configGroupToDpiMap.find(configGroup) == configGroupToDpiMap.end()) { - configGroupToDpiMap[configGroup] = {dpiX, dpiY}; - } - EXPECT_EQ(configGroupToDpiMap[configGroup].x, dpiX); - EXPECT_EQ(configGroupToDpiMap[configGroup].y, dpiY); - } - } -} - TEST_P(GraphicsComposerHidlTest, getDisplayVsyncPeriod_BadDisplay) { VsyncPeriodNanos vsyncPeriodNanos; EXPECT_EQ(Error::BAD_DISPLAY,