1 #ifndef DALI_EGL_GRAPHICS_CONTROLLER_H
2 #define DALI_EGL_GRAPHICS_CONTROLLER_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #include <dali/graphics-api/graphics-controller.h>
27 class GlSyncAbstraction;
28 class GlContextHelperAbstraction;
29 } // namespace Integration
34 * EGL Implementation of the graphics controller.
36 * Temporarily holds the old GL abstractions whilst dali-core is migrated to the new API.
38 class EglGraphicsController : public Graphics::Controller
41 EglGraphicsController() = default;
43 virtual ~EglGraphicsController() = default;
46 * Initialize the GLES abstraction. This can be called from the main thread.
48 void InitializeGLES(Integration::GlAbstraction& glAbstraction);
51 * Initialize with a reference to the GL abstractions.
53 * Note, this is now executed in the render thread, after core initialization
55 void Initialize(Integration::GlSyncAbstraction& glSyncAbstraction,
56 Integration::GlContextHelperAbstraction& glContextHelperAbstraction);
58 Integration::GlAbstraction& GetGlAbstraction() override;
59 Integration::GlSyncAbstraction& GetGlSyncAbstraction() override;
60 Integration::GlContextHelperAbstraction& GetGlContextHelperAbstraction() override;
63 Integration::GlAbstraction* mGlAbstraction{nullptr};
64 Integration::GlSyncAbstraction* mGlSyncAbstraction{nullptr};
65 Integration::GlContextHelperAbstraction* mGlContextHelperAbstraction{nullptr};
68 } // namespace Graphics
72 #endif //DALI_EGL_GRAPHICS_CONTROLLER_H