1 #ifndef DALI_INTEGRATION_THREAD_SYNCHRONIZATION_INTERFACE_H
2 #define DALI_INTEGRATION_THREAD_SYNCHRONIZATION_INTERFACE_H
5 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 * @brief Interface for the ThreadSyncrhonization handler.
26 * This handler ensure the threads are synchronized properly.
28 class ThreadSynchronizationInterface
31 /////////////////////////////////////////////////////////////////////////////////////////////////
32 // Called by the Event Thread if post-rendering is required
33 /////////////////////////////////////////////////////////////////////////////////////////////////
36 * @brief Surface informs that the post-render has been completed.
38 * @note Should only be called by the Event Thread if post-rendering is required.
40 virtual void PostRenderComplete() = 0;
42 /////////////////////////////////////////////////////////////////////////////////////////////////
43 // Called by the Render Thread if post-rendering is required
44 /////////////////////////////////////////////////////////////////////////////////////////////////
47 * @brief Called just before the post rendering is done by the surface.
49 * @note Should only be called by the Render Thread if post-rendering is required.
51 virtual void PostRenderStarted() = 0;
54 * @brief Blocks the render thread until the post rendering has been completed by the surface.
56 * @note Should only be called by the Render Thread if post-rendering is required.
58 virtual void PostRenderWaitForCompletion() = 0;
62 * @brief Protected constructor, no creation through this interface
64 ThreadSynchronizationInterface()
69 * Virtual protected destructor, no deletion through this interface
71 virtual ~ThreadSynchronizationInterface()
76 // Undefined copy constructor.
77 ThreadSynchronizationInterface(const ThreadSynchronizationInterface&);
79 // Undefined assignment operator.
80 ThreadSynchronizationInterface& operator=(const ThreadSynchronizationInterface&);
85 #endif // DALI_INTEGRATION_THREAD_SYNCHRONIZATION_INTERFACE_H