Lines Matching defs:node
165 auto node = (dstNode != nullptr ? dstNode : srcNode);
166 return CheckRemoteAnimationEnabled(node->GetDisplayId());
264 WLOGFI("node:%{public}u is not play show animation with state:%{public}u!", weakNode->GetWindowId(),
460 // need post task when visit windowRoot node map
638 // need post task when visit windowRoot node map
680 WMError RemoteAnimation::NotifyAnimationScreenUnlock(std::function<void(void)> callback, sptr<WindowNode> node)
686 sptr<RSWindowAnimationFinishedCallback> finishedCallback = CreateAnimationFinishedCallback(callback, node);
718 WLOGFW("Failed to create window animation target, window node is null!");
746 WLOGFE("Window surface node is null id:%{public}u, type:%{public}u!",
768 void RemoteAnimation::PostProcessShowCallback(const sptr<WindowNode>& node)
770 if (node == nullptr) {
774 auto winRect = node->GetWindowRect();
775 if (!node->leashWinSurfaceNode_) {
776 WLOGFD("leashWinSurfaceNode_ is nullptr with id: %{public}u!", node->GetWindowId());
780 node->GetWindowName().c_str(), node->GetWindowId(),
782 node->leashWinSurfaceNode_->SetBounds(
784 if (WindowHelper::IsRotatableWindow(node->GetWindowType(), node->GetWindowMode())) {
785 auto displayId = node->GetDisplayId();
786 auto requestOri = node->GetRequestedOrientation();
797 void RemoteAnimation::ExecuteFinalStateTask(sptr<WindowNode>& node)
801 if (winRoot == nullptr || node == nullptr) {
802 WLOGFE("windowRoot or node is nullptr");
805 if (node->stateMachine_.IsWindowNodeHiddenOrHiding()) {
806 WLOGFI("execute task removing from rs tree id:%{public}u!", node->GetWindowId());
807 winRoot->UpdateRsTree(node->GetWindowId(), false);
808 } else if (node->stateMachine_.IsWindowNodeShownOrShowing()) {
809 WLOGFI("execute task layout after show animation id:%{public}u!", node->GetWindowId());
810 winRoot->LayoutWhenAddWindowNode(node, true);
811 WindowSystemEffect::SetWindowEffect(node, false); // no need to check animationPlaying in finishCallback
814 winController->FlushWindowInfo(node->GetWindowId());
817 WLOGFD("current State:%{public}u invalid", static_cast<uint32_t>(node->stateMachine_.GetCurrentState()));
820 if (node->stateMachine_.GetDestroyTask(destroyTask)) {
836 auto node = weakNode.promote();
837 if (node == nullptr) {
840 WLOGFI("callback timeout process windowId:%{public}u", node->GetWindowId());
841 node->stateMachine_.ResetAnimationTaskCount(1);
842 ProcessNodeStateTask(node);
846 static void ReportWindowAnimationAbnormalInfo(sptr<WindowNode>& node)
849 oss << "animation callback more than task: " << "window_name: " << node->GetWindowName() << ";";
851 info += node->stateMachine_.GenStateMachineInfo();
856 "PID", node->GetCallingPid(),
857 "UID", node->GetCallingUid(),
858 "PACKAGE_NAME", node->abilityInfo_.abilityName_,
859 "PROCESS_NAME", node->abilityInfo_.bundleName_,
866 void RemoteAnimation::ProcessNodeStateTask(sptr<WindowNode>& node)
868 // when callback come, node maybe destroyed
869 if (node == nullptr) {
870 WLOGFI("node is nullptr!");
873 int32_t taskCount = node->stateMachine_.GetAnimationCount();
876 node->GetWindowId(), node->GetWindowName().c_str(), taskCount);
877 ReportWindowAnimationAbnormalInfo(node);
880 node->stateMachine_.UpdateAnimationTaskCount(false);
881 taskCount = node->stateMachine_.GetAnimationCount();
883 node->GetWindowId(), node->GetWindowName().c_str(),
884 static_cast<uint32_t>(node->stateMachine_.GetCurrentState()), taskCount);
887 node->GetWindowId(), taskCount);
890 ExecuteFinalStateTask(node);
891 if (node->stateMachine_.IsWindowNodeShownOrShowing()) {
893 PostProcessShowCallback(node);
894 node->stateMachine_.TransitionTo(WindowNodeState::SHOW_ANIMATION_DONE);
895 } else if (node->stateMachine_.IsWindowNodeHiddenOrHiding()) {
896 node->stateMachine_.TransitionTo(WindowNodeState::HIDE_ANIMATION_DONE);
899 winRoot->UpdateDisplayOrientationWhenHideWindow(node);
901 } else if (node->stateMachine_.GetCurrentState() == WindowNodeState::DESTROYED) {
904 winRoot->UpdateDisplayOrientationWhenHideWindow(node);
976 void RemoteAnimation::NotifyAnimationUpdateWallpaper(sptr<WindowNode> node)
982 sptr<RSWindowAnimationTarget> srcTarget = CreateWindowAnimationTarget(nullptr, node);
998 WLOGFE("window node or ability token is nullptr");
1026 static void ReportWindowAnimationCallbackTimeout(sptr<WindowNode>& node, const std::string& taskName)
1029 oss << "animation callback time out: " << "window_name: " << node->GetWindowName()
1036 "PID", node->GetCallingPid(),
1037 "UID", node->GetCallingUid(),
1038 "PACKAGE_NAME", node->abilityInfo_.abilityName_,
1039 "PROCESS_NAME", node->abilityInfo_.bundleName_,
1059 auto node = weakNode.promote();
1060 if (node == nullptr) {
1061 WLOGFW("window node is null or is home event, not report abnormal info!");
1064 ReportWindowAnimationCallbackTimeout(node, timeOutTaskName);