composer: VtsDisplay::setDimensions shouldn't be const
Fix the usage of const attribute in VtsDisplay Test: run composer 2.4 VTS Bug: 185195256 Change-Id: I616ea044f46bc080ad0e82753b5031d9a38369f3
This commit is contained in:
parent
e1dd0085d9
commit
2fff170562
1 changed files with 9 additions and 9 deletions
|
@ -73,15 +73,15 @@ class VtsDisplay {
|
|||
|
||||
IComposerClient::Rect getFrameRect() const { return {0, 0, mDisplayWidth, mDisplayHeight}; }
|
||||
|
||||
void setDimensions(int32_t displayWidth, int32_t displayHeight) const {
|
||||
void setDimensions(int32_t displayWidth, int32_t displayHeight) {
|
||||
mDisplayWidth = displayWidth;
|
||||
mDisplayHeight = displayHeight;
|
||||
}
|
||||
|
||||
private:
|
||||
const Display mDisplay;
|
||||
mutable int32_t mDisplayWidth;
|
||||
mutable int32_t mDisplayHeight;
|
||||
int32_t mDisplayWidth;
|
||||
int32_t mDisplayHeight;
|
||||
};
|
||||
|
||||
class GraphicsComposerHidlTest : public ::testing::TestWithParam<std::string> {
|
||||
|
@ -200,7 +200,7 @@ class GraphicsComposerHidlTest : public ::testing::TestWithParam<std::string> {
|
|||
const ContentType& contentType, const char* contentTypeStr);
|
||||
|
||||
Error setActiveConfigWithConstraints(
|
||||
const VtsDisplay& display, Config config,
|
||||
VtsDisplay& display, Config config,
|
||||
const IComposerClient::VsyncPeriodChangeConstraints& constraints,
|
||||
VsyncPeriodChangeTimeline* timeline) {
|
||||
const auto error = mComposerClient->setActiveConfigWithConstraints(display.get(), config,
|
||||
|
@ -215,7 +215,7 @@ class GraphicsComposerHidlTest : public ::testing::TestWithParam<std::string> {
|
|||
return error;
|
||||
}
|
||||
|
||||
void setActiveConfig(const VtsDisplay& display, Config config) {
|
||||
void setActiveConfig(VtsDisplay& display, Config config) {
|
||||
mComposerClient->setActiveConfig(display.get(), config);
|
||||
const int32_t displayWidth = mComposerClient->getDisplayAttribute_2_4(
|
||||
display.get(), config, IComposerClient::Attribute::WIDTH);
|
||||
|
@ -377,7 +377,7 @@ TEST_P(GraphicsComposerHidlTest, getDisplayVsyncPeriod_BadDisplay) {
|
|||
}
|
||||
|
||||
TEST_P(GraphicsComposerHidlTest, getDisplayVsyncPeriod) {
|
||||
for (const auto& display : mDisplays) {
|
||||
for (VtsDisplay& display : mDisplays) {
|
||||
for (Config config : mComposerClient->getDisplayConfigs(display.get())) {
|
||||
VsyncPeriodNanos expectedVsyncPeriodNanos = mComposerClient->getDisplayAttribute_2_4(
|
||||
display.get(), config,
|
||||
|
@ -441,7 +441,7 @@ TEST_P(GraphicsComposerHidlTest, setActiveConfigWithConstraints_BadConfig) {
|
|||
constraints.seamlessRequired = false;
|
||||
constraints.desiredTimeNanos = systemTime();
|
||||
|
||||
for (const auto& display : mDisplays) {
|
||||
for (VtsDisplay& display : mDisplays) {
|
||||
Config invalidConfigId = GetInvalidConfigId(display.get());
|
||||
EXPECT_EQ(Error::BAD_CONFIG,
|
||||
setActiveConfigWithConstraints(display, invalidConfigId, constraints, &timeline));
|
||||
|
@ -455,7 +455,7 @@ TEST_P(GraphicsComposerHidlTest, setActiveConfigWithConstraints_SeamlessNotAllow
|
|||
constraints.seamlessRequired = true;
|
||||
constraints.desiredTimeNanos = systemTime();
|
||||
|
||||
for (const auto& display : mDisplays) {
|
||||
for (VtsDisplay& display : mDisplays) {
|
||||
forEachTwoConfigs(display.get(), [&](Config config1, Config config2) {
|
||||
const auto configGroup1 = mComposerClient->getDisplayAttribute_2_4(
|
||||
display.get(), config1,
|
||||
|
@ -553,7 +553,7 @@ void GraphicsComposerHidlTest::waitForVsyncPeriodChange(Display display,
|
|||
}
|
||||
|
||||
void GraphicsComposerHidlTest::Test_setActiveConfigWithConstraints(const TestParameters& params) {
|
||||
for (const auto& display : mDisplays) {
|
||||
for (VtsDisplay& display : mDisplays) {
|
||||
forEachTwoConfigs(display.get(), [&](Config config1, Config config2) {
|
||||
setActiveConfig(display, config1);
|
||||
sendRefreshFrame(display, nullptr);
|
||||
|
|
Loading…
Reference in a new issue