mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-12-12 01:24:05 +00:00
Merge branch 'master' of gitee.com:openharmony/window_window_manager into jilinghao4
Change-Id: I1043aef49d2719d8090e5eb68773bf1496611741
This commit is contained in:
commit
73d203db1c
@ -245,7 +245,7 @@ bool SnapShotUtils::WriteRgb888ToJpeg(FILE* file, uint32_t width, uint32_t heigh
|
|||||||
jpeg.in_color_space = JCS_RGB;
|
jpeg.in_color_space = JCS_RGB;
|
||||||
jpeg_set_defaults(&jpeg);
|
jpeg_set_defaults(&jpeg);
|
||||||
|
|
||||||
constexpr int32_t quality = 100;
|
constexpr int32_t quality = 75;
|
||||||
jpeg_set_quality(&jpeg, quality, TRUE);
|
jpeg_set_quality(&jpeg, quality, TRUE);
|
||||||
|
|
||||||
jpeg_stdio_dest(&jpeg, file);
|
jpeg_stdio_dest(&jpeg, file);
|
||||||
|
@ -485,6 +485,7 @@ HWTEST_F(ScreenManagerTest, ScreenManager08, Function | MediumTest | Level2)
|
|||||||
HWTEST_F(ScreenManagerTest, ScreenManager09, Function | MediumTest | Level2)
|
HWTEST_F(ScreenManagerTest, ScreenManager09, Function | MediumTest | Level2)
|
||||||
{
|
{
|
||||||
(void)system("param set rosen.uni.partialrender.enabled 0");
|
(void)system("param set rosen.uni.partialrender.enabled 0");
|
||||||
|
|
||||||
DisplayTestUtils utils;
|
DisplayTestUtils utils;
|
||||||
ASSERT_TRUE(utils.CreateSurface());
|
ASSERT_TRUE(utils.CreateSurface());
|
||||||
defaultOption_.surface_ = utils.psurface_;
|
defaultOption_.surface_ = utils.psurface_;
|
||||||
@ -523,6 +524,7 @@ HWTEST_F(ScreenManagerTest, ScreenManager09, Function | MediumTest | Level2)
|
|||||||
window->Show();
|
window->Show();
|
||||||
sleep(TEST_SLEEP_S_LONG);
|
sleep(TEST_SLEEP_S_LONG);
|
||||||
window->Destroy();
|
window->Destroy();
|
||||||
|
|
||||||
(void)system("param set rosen.uni.partialrender.enabled 4");
|
(void)system("param set rosen.uni.partialrender.enabled 4");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -877,15 +879,18 @@ HWTEST_F(ScreenManagerTest, VirtualExpandScreen01, Function | MediumTest | Level
|
|||||||
ASSERT_TRUE(utils.CreateSurface());
|
ASSERT_TRUE(utils.CreateSurface());
|
||||||
defaultOption_.surface_ = utils.psurface_;
|
defaultOption_.surface_ = utils.psurface_;
|
||||||
defaultOption_.isForShot_ = true;
|
defaultOption_.isForShot_ = true;
|
||||||
|
|
||||||
CHECK_TEST_INIT_SCREEN_STATE
|
CHECK_TEST_INIT_SCREEN_STATE
|
||||||
ScreenId virtualScreenId = ScreenManager::GetInstance().CreateVirtualScreen(defaultOption_);
|
ScreenId virtualScreenId = ScreenManager::GetInstance().CreateVirtualScreen(defaultOption_);
|
||||||
sleep(TEST_SLEEP_S);
|
sleep(TEST_SLEEP_S);
|
||||||
|
|
||||||
CHECK_SCREEN_STATE_AFTER_CREATE_VIRTUAL_SCREEN
|
CHECK_SCREEN_STATE_AFTER_CREATE_VIRTUAL_SCREEN
|
||||||
CheckScreenStateInGroup(false, group, groupId, virtualScreen, virtualScreenId);
|
CheckScreenStateInGroup(false, group, groupId, virtualScreen, virtualScreenId);
|
||||||
sleep(TEST_SLEEP_S);
|
sleep(TEST_SLEEP_S);
|
||||||
std::vector<ExpandOption> options = {{defaultScreenId_, 0, 0}, {virtualScreenId, defaultWidth_, 0}};
|
std::vector<ExpandOption> options = {{defaultScreenId_, 0, 0}, {virtualScreenId, defaultWidth_, 0}};
|
||||||
ScreenId expansionId = ScreenManager::GetInstance().MakeExpand(options);
|
ScreenId expansionId = ScreenManager::GetInstance().MakeExpand(options);
|
||||||
sleep(TEST_SLEEP_S);
|
sleep(TEST_SLEEP_S);
|
||||||
|
|
||||||
CheckScreenGroupState(ScreenCombination::SCREEN_EXPAND, ScreenGroupChangeEvent::ADD_TO_GROUP,
|
CheckScreenGroupState(ScreenCombination::SCREEN_EXPAND, ScreenGroupChangeEvent::ADD_TO_GROUP,
|
||||||
virtualScreenId, group, screenGroupChangeListener);
|
virtualScreenId, group, screenGroupChangeListener);
|
||||||
CheckScreenStateInGroup(true, group, groupId, virtualScreen, virtualScreenId);
|
CheckScreenStateInGroup(true, group, groupId, virtualScreen, virtualScreenId);
|
||||||
@ -908,6 +913,7 @@ HWTEST_F(ScreenManagerTest, VirtualExpandScreen01, Function | MediumTest | Level
|
|||||||
ASSERT_TRUE(screen);
|
ASSERT_TRUE(screen);
|
||||||
auto display = DisplayManager::GetInstance().GetDisplayByScreen(virtualScreenId);
|
auto display = DisplayManager::GetInstance().GetDisplayByScreen(virtualScreenId);
|
||||||
ASSERT_TRUE(display);
|
ASSERT_TRUE(display);
|
||||||
|
|
||||||
uint32_t orientation = static_cast<uint32_t>(Orientation::VERTICAL);
|
uint32_t orientation = static_cast<uint32_t>(Orientation::VERTICAL);
|
||||||
uint32_t end = static_cast<uint32_t>(Orientation::REVERSE_HORIZONTAL);
|
uint32_t end = static_cast<uint32_t>(Orientation::REVERSE_HORIZONTAL);
|
||||||
ASSERT_TRUE(screenListener);
|
ASSERT_TRUE(screenListener);
|
||||||
@ -928,8 +934,8 @@ HWTEST_F(ScreenManagerTest, VirtualExpandScreen01, Function | MediumTest | Level
|
|||||||
window->Destroy();
|
window->Destroy();
|
||||||
DMError res = ScreenManager::GetInstance().DestroyVirtualScreen(virtualScreenId);
|
DMError res = ScreenManager::GetInstance().DestroyVirtualScreen(virtualScreenId);
|
||||||
sleep(TEST_SLEEP_S);
|
sleep(TEST_SLEEP_S);
|
||||||
|
|
||||||
ASSERT_EQ(DMError::DM_OK, res);
|
ASSERT_EQ(DMError::DM_OK, res);
|
||||||
|
|
||||||
ScreenManager::GetInstance().UnregisterScreenListener(screenListener);
|
ScreenManager::GetInstance().UnregisterScreenListener(screenListener);
|
||||||
ScreenManager::GetInstance().UnregisterScreenGroupListener(screenGroupChangeListener);
|
ScreenManager::GetInstance().UnregisterScreenGroupListener(screenGroupChangeListener);
|
||||||
ScreenManager::GetInstance().UnregisterVirtualScreenGroupListener(virtualScreenGroupChangeListener);
|
ScreenManager::GetInstance().UnregisterVirtualScreenGroupListener(virtualScreenGroupChangeListener);
|
||||||
|
@ -682,7 +682,7 @@ WMError WindowManagerService::CreateWindow(sptr<IWindow>& window, sptr<WindowPro
|
|||||||
WLOGFE("window is invalid");
|
WLOGFE("window is invalid");
|
||||||
return WMError::WM_ERROR_NULLPTR;
|
return WMError::WM_ERROR_NULLPTR;
|
||||||
}
|
}
|
||||||
if(!CheckSystemWindowPermission(property)) {
|
if (!CheckSystemWindowPermission(property)) {
|
||||||
WLOGFE("create system window permission denied!");
|
WLOGFE("create system window permission denied!");
|
||||||
return WMError::WM_ERROR_INVALID_PERMISSION;
|
return WMError::WM_ERROR_INVALID_PERMISSION;
|
||||||
}
|
}
|
||||||
|
@ -185,6 +185,10 @@ void WindowNodeContainer::LayoutWhenAddWindowNode(sptr<WindowNode>& node, bool a
|
|||||||
{
|
{
|
||||||
if (afterAnimation) {
|
if (afterAnimation) {
|
||||||
layoutPolicy_->PerformWindowLayout(node, WindowUpdateType::WINDOW_UPDATE_ADDED);
|
layoutPolicy_->PerformWindowLayout(node, WindowUpdateType::WINDOW_UPDATE_ADDED);
|
||||||
|
// tile layout will change window mode from fullscreen to float
|
||||||
|
// notify systembar window to change color
|
||||||
|
NotifyIfAvoidAreaChanged(node, AvoidControlType::AVOID_NODE_ADD);
|
||||||
|
DumpScreenWindowTreeByWinId(node->GetWindowId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WLOGI("AddWindowNode Id:%{public}u, currState:%{public}u",
|
WLOGI("AddWindowNode Id:%{public}u, currState:%{public}u",
|
||||||
@ -206,6 +210,10 @@ void WindowNodeContainer::LayoutWhenAddWindowNode(sptr<WindowNode>& node, bool a
|
|||||||
node->SetWindowSizeChangeReason(WindowSizeChangeReason::CUSTOM_ANIMATION_SHOW);
|
node->SetWindowSizeChangeReason(WindowSizeChangeReason::CUSTOM_ANIMATION_SHOW);
|
||||||
}
|
}
|
||||||
layoutPolicy_->PerformWindowLayout(node, WindowUpdateType::WINDOW_UPDATE_ADDED);
|
layoutPolicy_->PerformWindowLayout(node, WindowUpdateType::WINDOW_UPDATE_ADDED);
|
||||||
|
// tile layout will change window mode from fullscreen to float
|
||||||
|
// notify systembar window to change color
|
||||||
|
NotifyIfAvoidAreaChanged(node, AvoidControlType::AVOID_NODE_ADD);
|
||||||
|
DumpScreenWindowTreeByWinId(node->GetWindowId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,8 +250,6 @@ WMError WindowNodeContainer::AddWindowNode(sptr<WindowNode>& node, sptr<WindowNo
|
|||||||
}
|
}
|
||||||
AssignZOrder();
|
AssignZOrder();
|
||||||
LayoutWhenAddWindowNode(node, afterAnimation);
|
LayoutWhenAddWindowNode(node, afterAnimation);
|
||||||
NotifyIfAvoidAreaChanged(node, AvoidControlType::AVOID_NODE_ADD);
|
|
||||||
DumpScreenWindowTreeByWinId(node->GetWindowId());
|
|
||||||
UpdateCameraFloatWindowStatus(node, true);
|
UpdateCameraFloatWindowStatus(node, true);
|
||||||
if (WindowHelper::IsAppWindow(node->GetWindowType())) {
|
if (WindowHelper::IsAppWindow(node->GetWindowType())) {
|
||||||
backupWindowIds_.clear();
|
backupWindowIds_.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user