mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-26 16:40:56 +00:00
!10569 可见性上报修改
Merge pull request !10569 from zzz/cherry-pick-1730962431
This commit is contained in:
commit
4654c86a82
@ -7687,9 +7687,10 @@ std::vector<std::pair<uint64_t, WindowVisibilityState>> SceneSessionManager::Get
|
||||
if (lastVisibleData_[i].first < currVisibleData[j].first) {
|
||||
visibilityChangeInfo.emplace_back(lastVisibleData_[i].first, WINDOW_VISIBILITY_STATE_TOTALLY_OCCUSION);
|
||||
i++;
|
||||
} else if (lastVisibleData_[i].first > currVisibleData[j].first &&
|
||||
currVisibleData[j].second != WINDOW_VISIBILITY_STATE_TOTALLY_OCCUSION) {
|
||||
visibilityChangeInfo.emplace_back(currVisibleData[j].first, currVisibleData[j].second);
|
||||
} else if (lastVisibleData_[i].first > currVisibleData[j].first) {
|
||||
if (currVisibleData[j].second != WINDOW_VISIBILITY_STATE_TOTALLY_OCCUSION) {
|
||||
visibilityChangeInfo.emplace_back(currVisibleData[j].first, currVisibleData[j].second);
|
||||
}
|
||||
j++;
|
||||
} else {
|
||||
if (lastVisibleData_[i].second != currVisibleData[j].second) {
|
||||
|
@ -233,6 +233,14 @@ HWTEST_F(SceneSessionManagerTest6, GetWindowVisibilityChangeInfo03, Function | S
|
||||
std::make_pair(2, WindowVisibilityState::WINDOW_VISIBILITY_STATE_PARTICALLY_OCCLUSION));
|
||||
visibilityChangeInfos = ssm_->GetWindowVisibilityChangeInfo(currVisibleData);
|
||||
ASSERT_EQ(visibilityChangeInfos.size(), 1);
|
||||
currVisibleData.clear();
|
||||
ssm_->lastVisibleData_.clear();
|
||||
currVisibleData.push_back(std::make_pair(1, WindowVisibilityState::WINDOW_VISIBILITY_STATE_TOTALLY_OCCUSION));
|
||||
ssm_->lastVisibleData_.push_back(
|
||||
std::make_pair(2, WindowVisibilityState::WINDOW_VISIBILITY_STATE_NO_OCCLUSION));
|
||||
visibilityChangeInfos = ssm_->GetWindowVisibilityChangeInfo(currVisibleData);
|
||||
ASSERT_EQ(visibilityChangeInfos.size(), 1);
|
||||
ASSERT_EQ(visibilityChangeInfos[0].first, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user