DALi Version 2.3.21
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / android / egl-sync-implementation-android.cpp
1 /*
2  * Copyright (c) 2024 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/graphics/gles/egl-sync-implementation.h>
20
21 // EXTERNAL INCLUDES
22
23 #include <dali/integration-api/debug.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/internal/graphics/gles/egl-debug.h>
27 #include <dali/internal/graphics/gles/egl-implementation.h>
28
29 #if defined(DEBUG_ENABLED)
30 Debug::Filter* gLogSyncFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_FENCE_SYNC");
31 #endif
32
33 namespace Dali
34 {
35 namespace Internal
36 {
37 namespace Adaptor
38 {
39 EglSyncObject::EglSyncObject(EglImplementation& eglImpl)
40 : mPollCounter(3),
41   mEglImplementation(eglImpl)
42 {
43 }
44
45 EglSyncObject::~EglSyncObject()
46 {
47 }
48
49 bool EglSyncObject::IsSynced()
50 {
51   return true;
52 }
53
54 void EglSyncObject::Wait()
55 {
56 }
57
58 void EglSyncObject::ClientWait()
59 {
60 }
61
62 EglSyncImplementation::EglSyncImplementation()
63 : mEglImplementation(NULL),
64   mSyncInitialized(false),
65   mSyncInitializeFailed(false)
66 {
67 }
68
69 EglSyncImplementation::~EglSyncImplementation()
70 {
71 }
72
73 void EglSyncImplementation::Initialize(EglImplementation* eglImpl)
74 {
75   mEglImplementation = eglImpl;
76 }
77
78 Integration::GraphicsSyncAbstraction::SyncObject* EglSyncImplementation::CreateSyncObject()
79 {
80   DALI_ASSERT_ALWAYS(mEglImplementation && "Sync Implementation not initialized");
81   return new EglSyncObject(*mEglImplementation);
82 }
83
84 void EglSyncImplementation::DestroySyncObject(Integration::GraphicsSyncAbstraction::SyncObject* syncObject)
85 {
86   DALI_ASSERT_ALWAYS(mEglImplementation && "Sync Implementation not initialized");
87   delete static_cast<EglSyncObject*>(syncObject);
88 }
89
90 void EglSyncImplementation::InitializeEglSync()
91 {
92 }
93
94 } // namespace Adaptor
95 } // namespace Internal
96 } // namespace Dali