diff options
| author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-10-23 01:07:14 +0000 |
|---|---|---|
| committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-10-23 01:07:14 +0000 |
| commit | fc790fd41fea4f381f44c37e445cf665a79f1620 (patch) | |
| tree | d0d45c725956c9f7396c07fa8be16b6ca2f05fca | |
| parent | afef122a87a2a4617f6026757b47bd4efb4b2903 (diff) | |
| parent | 3ccc2de9c43430e4f9b54ed589bee65e0e69dc52 (diff) | |
Snap for 7848193 from 3ccc2de9c43430e4f9b54ed589bee65e0e69dc52 to sc-v2-release
Change-Id: I5b2bcc034918c90137995a8d6303fe7e88ee44ce
| -rw-r--r-- | graphics/composer/2.4/vts/functional/VtsHalGraphicsComposerV2_4TargetTest.cpp | 55 |
1 files changed, 0 insertions, 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 5aceda721..b071f71e8 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 <algorithm> #include <regex> #include <thread> -#include <unordered_map> -#include <utility> #include <android-base/logging.h> #include <android-base/properties.h> @@ -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<Config> configs = mComposerClient->getDisplayConfigs(display.get()); - std::unordered_map<int32_t, Resolution> configGroupToResolutionMap; - std::unordered_map<int32_t, Dpi> 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, |
