已开启
HAD分辨率变化 #24
wangdi创建于  7月3日
wangdi成员
7月3日 创建

HAD分辨率变化

likedislike
wangdi成员
7月31日 评论:
  void ScreenSessionManager::AddUserDisplayNodeOnTree(int32_t userId)
  {
      TLOGNFI(WmsLogTag::DMS, "userId: %{public}d", userId);
      if (!CheckUserIsForeground(userId)) {
          TLOGNFI(WmsLogTag::DMS, "user: %{public}d is background not on tree", userId);
          return;
      }
      auto userDisplayNodeMap = GetUserDisplayNodeMap(userId);
      std::unordered_set<std::shared_ptr<RSUIContext>> rsUIContexts;
      for (auto userDisplayNodeIt : userDisplayNodeMap) {
          auto displayNode = userDisplayNodeIt.second;
          if (displayNode == nullptr) {
              continue;
          }
          auto screenId = userDisplayNodeIt.first;
          auto screenSession = GetScreenSession(screenId);
          if (!screenSession) {
              TLOGNFW(WmsLogTag::DMS, "screen Session is null");
              continue;
          }
          // 仅第二屏模式:非 extend 屏的 displayNode 不上树
          if (GetIsOuterOnlyMode() && !screenSession->GetIsExtend()) {
              TLOGNFI(WmsLogTag::DMS, "outer only mode, skip screenId: %{public}" PRIu64, screenId);
              continue;
          }
          displayNode->AddDisplayNodeToTree();
          TLOGNFI(WmsLogTag::DMS, "displayNode: %{public}" PRIu64, displayNode->GetId());
          rsUIContexts.insert(screenSession->GetRSUIContext());
      }
      RSTransactionAdapter::FlushImplicitTransaction(rsUIContexts);
  }
likedislike