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 #ifndef RENDER_SERVICE_CLIENT_CORE_UI_RS_UI_SHARE_CONTEXT_H 16 #define RENDER_SERVICE_CLIENT_CORE_UI_RS_UI_SHARE_CONTEXT_H 17 18 #ifdef ROSEN_IOS 19 #include "render_context/render_context_egl_defines.h" 20 #else 21 #include "EGL/egl.h" 22 #endif 23 #include "common/rs_common_def.h" 24 25 namespace OHOS { 26 namespace Rosen { 27 class RSC_EXPORT RSUIShareContext final { 28 public: 29 static RSUIShareContext& GetInstance(); 30 ~RSUIShareContext() = default; 31 EGLContext GetRsRenderContext() const; 32 private: 33 RSUIShareContext() = default; 34 RSUIShareContext(const RSUIShareContext&) = delete; 35 RSUIShareContext& operator=(const RSUIShareContext&) = delete; 36 }; 37 } // namespace Rosen 38 } // namespace OHOS 39 #endif // RENDER_SERVICE_CLIENT_CORE_UI_RS_UI_SHARE_CONTEXT_H