!12336 动效速度为0时不参与决策

Merge pull request !12336 from zsw/GetPreferredFps
This commit is contained in:
openharmony_ci 2024-06-26 11:31:11 +00:00 committed by Gitee
commit 5c456ce109
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -589,7 +589,7 @@ int32_t HgmFrameRateManager::GetExpectedFrameRate(const RSPropertyUnit unit, flo
case RSPropertyUnit::RATIO_SCALE:
return GetPreferredFps("scale", PixelToMM(velocity));
case RSPropertyUnit::ANGLE_ROTATION:
return GetPreferredFps("rotation", velocity);
return GetPreferredFps("rotation", PixelToMM(velocity));
default:
return 0;
}
@ -601,6 +601,9 @@ int32_t HgmFrameRateManager::GetPreferredFps(const std::string& type, float velo
if (!configData) {
return 0;
}
if (ROSEN_EQ(velocity, 0.f)) {
return 0;
}
const std::string settingMode = std::to_string(curRefreshRateMode_);
if (configData->screenConfigs_.count(curScreenStrategyId_) &&
configData->screenConfigs_[curScreenStrategyId_].count(settingMode) &&