1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef RENDER_SERVICE_WINDOW_KEYFRAME_NODE_INFO_H 17 #define RENDER_SERVICE_WINDOW_KEYFRAME_NODE_INFO_H 18 19 #include <unordered_map> 20 #include "common/rs_common_def.h" 21 #include "pipeline/rs_surface_render_node.h" 22 23 namespace OHOS::Rosen { 24 25 class RSWindowKeyframeNodeInfo { 26 public: 27 RSWindowKeyframeNodeInfo() = default; 28 ~RSWindowKeyframeNodeInfo() = default; 29 30 void UpdateLinkedNodeId(NodeId srcNodeId, NodeId linkedNodeId); 31 size_t GetLinkedNodeCount() const; 32 void ClearLinkedNodeInfo(); 33 34 bool PrepareRootNodeOffscreen(RSSurfaceRenderNode& surfaceNode); 35 36 private: 37 RSWindowKeyframeNodeInfo(const RSWindowKeyframeNodeInfo&) = delete; 38 RSWindowKeyframeNodeInfo(const RSWindowKeyframeNodeInfo&&) = delete; 39 RSWindowKeyframeNodeInfo& operator=(const RSWindowKeyframeNodeInfo&) = delete; 40 RSWindowKeyframeNodeInfo& operator=(const RSWindowKeyframeNodeInfo&&) = delete; 41 42 std::unordered_map<NodeId, NodeId> linkedNodeMap_; 43 }; 44 45 } // namespace OHOS::Rosen 46 #endif // RENDER_SERVICE_WINDOW_KEYFRAME_NODE_INFO_H 47