1 /* 2 * Copyright (c) 2021-2023 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 /** 17 * @addtogroup RenderNodeDisplay 18 * @{ 19 * 20 * @brief Display render nodes. 21 */ 22 23 /** 24 * @file rs_surface_extractor.h 25 * 26 * @brief Defines the properties and methods for RSDisplayNode class. 27 */ 28 29 #ifndef RENDER_SERVICE_CLIENT_CORE_UI_RS_SURFACE_EXECTOR_H 30 #define RENDER_SERVICE_CLIENT_CORE_UI_RS_SURFACE_EXECTOR_H 31 32 #include "platform/drawing/rs_surface.h" 33 #include "ui/rs_surface_node.h" 34 35 namespace OHOS { 36 namespace Rosen { 37 38 /** 39 * @class RSSurfaceExtractor 40 * 41 * @brief The class for extracting RSSurface from a RSSurfaceNode. 42 */ 43 class RSC_EXPORT RSSurfaceExtractor { 44 public: 45 /** 46 * @brief Extracts RSSurface. 47 * 48 * @param node A shared pointer to the RSSurfaceNode from which to extract the RSSurface. 49 * @return The extracted RSSurface, or nullptr if node is nullptr. 50 */ 51 static std::shared_ptr<RSSurface> ExtractRSSurface(std::shared_ptr<RSSurfaceNode> node); 52 }; 53 } // namespace Rosen 54 } // namespace OHOS 55 56 /** @} */ 57 #endif // RENDER_SERVICE_CLIENT_CORE_UI_RS_SURFACE_EXECTOR_H