Merge "Fixed an issue where the multi-tap did not work properly. (https://review...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-sync-object.cpp
1 /*
2  * Copyright (c) 2021 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 #include "test-graphics-sync-object.h"
18
19 namespace Dali
20 {
21 TestGraphicsSyncObject::TestGraphicsSyncObject(TestGraphicsSyncImplementation& syncImpl, const Graphics::SyncObjectCreateInfo& createInfo)
22 : mSyncImplementation(syncImpl),
23   mSyncObject(nullptr),
24   mCreateInfo(createInfo)
25 {
26 }
27
28 TestGraphicsSyncObject::~TestGraphicsSyncObject()
29 {
30   mSyncImplementation.DestroySyncObject(mSyncObject);
31 }
32
33 void TestGraphicsSyncObject::InitializeResource()
34 {
35   mSyncObject = static_cast<TestSyncObject*>(mSyncImplementation.CreateSyncObject());
36 }
37
38 bool TestGraphicsSyncObject::IsSynced()
39 {
40   bool synced = false;
41   if(mSyncObject)
42   {
43     synced = mSyncObject->IsSynced();
44   }
45   return synced;
46 }
47
48 } // namespace Dali