Lines Matching refs:displayId

28 void DisplayGroupController::InitNewDisplay(DisplayId displayId)
35 sysBarNodeMaps_.insert(std::make_pair(displayId, sysBarNodeMap));
41 sysBarTintMaps_.insert(std::make_pair(displayId, sysBarTintMap));
51 displayGroupWindowTree_.insert(std::make_pair(displayId, std::move(displayWindowTree)));
54 auto windowPair = new WindowPair(displayId);
55 windowPairMap_.insert(std::make_pair(displayId, windowPair));
58 std::vector<sptr<WindowNode>>* DisplayGroupController::GetWindowNodesByDisplayIdAndRootType(DisplayId displayId,
61 if (displayGroupWindowTree_.find(displayId) != displayGroupWindowTree_.end()) {
62 auto& displayWindowTree = displayGroupWindowTree_[displayId];
76 WLOGFD("add node in node vector of root, displayId: %{public}" PRIu64" windowId: %{public}d, "
117 WLOGFD("process cross node, windowId: %{public}u, displayId: %{public}" PRIu64"",
131 for (auto& displayId : showingDisplays) {
132 if (displayId == newDisplayId) {
135 windowNodeContainer_->RemoveNodeFromRSTree(node, displayId, newDisplayId,
138 // update shown displays and displayId
222 // update displayId if needed
229 void DisplayGroupController::ChangeToRectInDisplayGroup(const sptr<WindowNode>& node, DisplayId displayId)
232 if (std::find(displays.begin(), displays.end(), displayId) != displays.end()) {
233 WLOGFD("Alreedy show in display %{public}" PRIu64 "", displayId);
238 const Rect& displayRect = DisplayGroupInfo::GetInstance().GetDisplayRect(displayId);
300 WLOGFD("update node displayId, srcDisplayId: %{public}" PRIu64", newDisplayId: %{public}" PRIu64"",
314 // update new displayId
324 void DisplayGroupController::MoveNotCrossNodeToDefaultDisplay(const sptr<WindowNode>& node, DisplayId displayId)
326 WLOGFD("windowId: %{public}d, displayId: %{public}" PRIu64"", node->GetWindowId(), displayId);
328 const Rect& srcDisplayRect = DisplayGroupInfo::GetInstance().GetDisplayRect(displayId);
343 // update new displayId
347 MoveNotCrossNodeToDefaultDisplay(childNode, displayId);
351 void DisplayGroupController::ProcessNotCrossNodesOnDestroyedDisplay(DisplayId displayId,
354 if (displayId == defaultDisplayId_) {
355 WLOGFE("Move window nodes failed, displayId is the same as defaultDisplayId");
358 if (displayGroupWindowTree_.find(displayId) == displayGroupWindowTree_.end()) {
359 WLOGFE("displayId: %{public}" PRIu64" not in display group window tree", displayId);
362 WLOGI("move window nodes for display destroy, displayId: %{public}" PRIu64"", displayId);
370 if (displayGroupWindowTree_[displayId].find(type) == displayGroupWindowTree_[displayId].end()) {
373 auto nodesVec = *(displayGroupWindowTree_[displayId][type]);
377 if (node->GetDisplayId() != displayId || node->isShowingOnMultiDisplays_) {
389 MoveNotCrossNodeToDefaultDisplay(node, displayId);
392 windowNodeContainer_->RemoveNodeFromRSTree(node, displayId, defaultDisplayId_,
404 WLOGI("defaultDisplay, displayId: %{public}" PRIu64"", defaultDisplayId);
406 DisplayId displayId = displayInfo->GetDisplayId();
408 InitNewDisplay(displayId);
420 layoutPolicy->ProcessDisplayCreate(displayId, displayRectMap);
430 DisplayId displayId = displayInfo->GetDisplayId();
432 ProcessNotCrossNodesOnDestroyedDisplay(displayId, windowIds);
436 ClearMapOfDestroyedDisplay(displayId);
437 windowNodeContainer_->GetLayoutPolicy()->ProcessDisplayDestroy(displayId, displayRectMap);
445 auto displayId = node->GetDisplayId();
446 auto iter = displayRectMap.find(displayId);
461 void DisplayGroupController::UpdateNodeSizeChangeReasonWithRotation(DisplayId displayId,
470 std::vector<sptr<WindowNode>>* rootNodeVectorPtr = GetWindowNodesByDisplayIdAndRootType(displayId, rootType);
472 WLOGFE("rootNodeVectorPtr is nullptr, %{public}d, displayId: %{public}" PRIu64, rootType, displayId);
495 DisplayId displayId = displayInfo->GetDisplayId();
496 WLOGI("display change, displayId: %{public}" PRIu64", type: %{public}d", displayId, type);
500 displayGroupInfo.SetDisplayRotation(displayId, displayInfo->GetRotation());
501 displayGroupInfo.SetDisplayOrientation(displayId, displayInfo->GetDisplayOrientation());
502 displayGroupInfo.SetDisplayStateChangeType(displayId, type);
507 ProcessDisplaySizeChangeOrRotation(defaultDisplayId, displayId, displayRectMap, type);
511 displayGroupInfo.SetDisplayVirtualPixelRatio(displayId, displayInfo->GetVirtualPixelRatio());
512 windowNodeContainer_->GetLayoutPolicy()->ProcessDisplayVprChange(displayId);
521 void DisplayGroupController::ProcessDisplaySizeChangeOrRotation(DisplayId defaultDisplayId, DisplayId displayId,
528 UpdateNodeSizeChangeReasonWithRotation(displayId, displayRectMap);
533 layoutPolicy->ProcessDisplaySizeChangeOrRotation(displayId, displayRectMap);
537 void DisplayGroupController::ClearMapOfDestroyedDisplay(DisplayId displayId)
539 sysBarTintMaps_.erase(displayId);
540 sysBarNodeMaps_.erase(displayId);
541 displayGroupWindowTree_.erase(displayId);
542 DisplayGroupInfo::GetInstance().RemoveDisplayInfo(displayId);
543 windowPairMap_.erase(displayId);
546 sptr<WindowPair> DisplayGroupController::GetWindowPairByDisplayId(DisplayId displayId)
548 if (windowPairMap_.find(displayId) != windowPairMap_.end()) {
549 return windowPairMap_[displayId];
557 const auto& displayId = elem.first;
558 const auto& windowPair = GetWindowPairByDisplayId(displayId);
560 WLOGFE("WindowPair is nullptr, displayId: %{public}" PRIu64"", displayId);
565 WLOGFE("LayoutPolicy is nullptr, displayId: %{public}" PRIu64"", displayId);
568 Rect divRect = layoutPolicy->GetDividerRect(displayId);
574 UpdateSplitRatioPoints(displayId);
581 const auto& displayId = elem.first;
582 const auto& windowPair = GetWindowPairByDisplayId(displayId);
584 WLOGFE("WindowPair is nullptr, displayId: %{public}" PRIu64"", displayId);
588 UpdateSplitRatioPoints(displayId);
592 void DisplayGroupController::UpdateSplitRatioPoints(DisplayId displayId)
594 const auto& windowPair = GetWindowPairByDisplayId(displayId);
596 WLOGFE("WindowPair is nullptr, displayId: %{public}" PRIu64"", displayId);
600 if (displayRects.find(displayId) == displayRects.end()) {
603 windowPair->CalculateSplitRatioPoints(displayRects[displayId]);
606 WLOGFE("LayoutPolicy is nullptr, displayId: %{public}" PRIu64"", displayId);
609 layoutPolicy->SetSplitRatioPoints(displayId, windowPair->GetSplitRatioPoints());