[4.0] Support EGL_DONT_CARE for multi-sampling level
[platform/core/uifw/dali-adaptor.git] / adaptors / common / gl / egl-factory.h
1 #ifndef __DALI_INTERNAL_ADAPTOR_EGL_FACTORY_IMPL_H__
2 #define __DALI_INTERNAL_ADAPTOR_EGL_FACTORY_IMPL_H__
3
4 /*
5  * Copyright (c) 2014 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 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <base/interfaces/egl-factory-interface.h>
25
26 namespace Dali
27 {
28 namespace Internal
29 {
30 namespace Adaptor
31 {
32 class EglImplementation;
33 class EglImageExtensions;
34 class EglSyncImplementation;
35
36 class EglFactory : public EglFactoryInterface
37 {
38 public:
39   /**
40    * Constructor
41    */
42   EglFactory( int multiSamplingLevel );
43
44   /**
45    * Destructor
46    */
47   virtual ~EglFactory();
48
49   /**
50    * Create an EGL Implementation
51    * @return[in] An implementation
52    */
53   EglInterface* Create();
54
55   /**
56    * Destroy the EGL Implementation
57    */
58   void Destroy();
59
60   /**
61    * Get an implementation if one has been created.
62    * @return An implementation, or NULL if one has not yet been created.
63    */
64   EglInterface* GetImplementation();
65
66   /**
67    * Get the image extension
68    */
69   EglImageExtensions* GetImageExtensions();
70
71   /**
72    * Get the fence sync implementation
73    * @return An implementation of fence sync
74    */
75   EglSyncImplementation* GetSyncImplementation();
76
77 private:
78   /** Undefined */
79   EglFactory(const EglFactory& rhs);
80   EglFactory& operator=(const EglFactory& rhs);
81
82 private:
83   EglImplementation* mEglImplementation;
84   EglImageExtensions* mEglImageExtensions;
85   EglSyncImplementation* mEglSync;
86
87   int mMultiSamplingLevel;
88 };
89
90 }
91 }
92 }
93
94 #endif //__DALI_INTERNAL_ADAPTOR_EGL_FACTORY_IMPL_H__