Merge "Changed 'virtual' function override declarations to 'override' in automated...
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles / egl-context-helper-implementation.h
1 #ifndef DALI_INTERNAL_ADAPTOR_EGL_CONTEXT_HELPER_IMPLEMENTATION_H
2 #define DALI_INTERNAL_ADAPTOR_EGL_CONTEXT_HELPER_IMPLEMENTATION_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 #include <dali/internal/graphics/common/egl-include.h>
22 // EXTERNAL INCLUDES
23 #include <dali/integration-api/gl-context-helper-abstraction.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/public-api/dali-adaptor-common.h>
27
28 namespace Dali
29 {
30
31 namespace Integration
32 {
33 class RenderSurface;
34 }
35
36 namespace Internal
37 {
38 namespace Adaptor
39 {
40
41 class EglImplementation;
42
43 /**
44  * EglContextHelperImplementation is a concrete implementation for GlContextHelperAbstraction.
45  * It provides helper functions to access EGL context APIs
46  */
47 class EglContextHelperImplementation : public Integration::GlContextHelperAbstraction
48 {
49 public:
50   /**
51    * Constructor
52    */
53   EglContextHelperImplementation();
54
55   /**
56    * Destructor
57    */
58   virtual ~EglContextHelperImplementation() = default;
59
60   /**
61    * Initialize with the Egl implementation.
62    * @param[in] impl The EGL implementation (to access the EGL context)
63    */
64   void Initialize( EglImplementation* impl );
65
66   /**
67    * @copydoc Dali::Integration::GlContextHelperAbstraction::MakeSurfacelessContextCurrent()
68    */
69   void MakeSurfacelessContextCurrent() override;
70
71   /**
72    * @copydoc Dali::Integration::GlContextHelperAbstraction::MakeContextNull()
73    */
74   void MakeContextNull() override;
75
76   /**
77    * @copydoc Dali::Integration::GlContextHelperAbstraction::WaitClient()
78    */
79   void WaitClient() override;
80
81 private:
82
83   EglImplementation* mEglImplementation; ///< Egl implementation (to access the EGL context)
84 };
85
86 } // namespace Adaptor
87 } // namespace Internal
88 } // namespace Dali
89
90 #endif // DALI_INTERNAL_ADAPTOR_EGL_CONTEXT_HELPER_IMPLEMENTATION_H