Dali 3D User Interface Engine
egl-sync-implementation.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_ADAPTOR_EGL_SYNC_IMPLEMENTATION_H__
2 #define __DALI_INTERNAL_ADAPTOR_EGL_SYNC_IMPLEMENTATION_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 #include <EGL/egl.h>
23 #include <EGL/eglext.h>
27 
28 namespace Dali
29 {
30 namespace Internal
31 {
32 namespace Adaptor
33 {
34 class EglImplementation;
35 
37 {
38 public:
42  EglSyncObject( EglImplementation& eglSyncImpl );
43 
47  virtual ~EglSyncObject();
48 
52  virtual bool IsSynced();
53 
54 private:
55 #ifdef _ARCH_ARM_
56  EGLSyncKHR mEglSync;
57 #else
58  int mPollCounter; // Implementations without fence sync use a 3 frame counter
59 #endif
61 };
62 
63 
73 {
74 public:
79 
83  virtual ~EglSyncImplementation();
84 
89  void Initialize( EglImplementation* impl );
90 
94  virtual SyncObject* CreateSyncObject();
95 
99  virtual void DestroySyncObject(SyncObject* syncObject);
100 
101 private:
105  void InitializeEglSync();
106 
107 private:
110 
114 
116 };
117 
118 } // namespace Adaptor
119 } // namespace Internal
120 } // namespace Dali
121 
122 #endif // __DALI_INTERNAL_EGL_ADAPTOR_SYNC_IMPLEMENTATION_H__
Dali Docs Home
Read more about Dali