1 #ifndef __DALI_INTEGRATION_THREAD_SYNCHRONIZATION_INTERFACE_H__
2 #define __DALI_INTEGRATION_THREAD_SYNCHRONIZATION_INTERFACE_H__
5 * Copyright (c) 2015 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.
26 * @brief Interface for the ThreadSyncrhonization handler.
28 * This handler ensure the threads are synchronized properly.
30 class ThreadSynchronizationInterface
34 /////////////////////////////////////////////////////////////////////////////////////////////////
35 // Called by the Event Thread if post-rendering is required
36 /////////////////////////////////////////////////////////////////////////////////////////////////
39 * @brief Surface informs that the post-render has been completed.
41 * @note Should only be called by the Event Thread if post-rendering is required.
43 virtual void PostRenderComplete() = 0;
45 /////////////////////////////////////////////////////////////////////////////////////////////////
46 // Called by the Render Thread if post-rendering is required
47 /////////////////////////////////////////////////////////////////////////////////////////////////
50 * @brief Called just before the post rendering is done by the surface.
52 * @note Should only be called by the Render Thread if post-rendering is required.
54 virtual void PostRenderStarted() = 0;
57 * @brief Blocks the render thread until the post rendering has been completed by the surface.
59 * @note Should only be called by the Render Thread if post-rendering is required.
61 virtual void PostRenderWaitForCompletion() = 0;
66 * @brief Protected constructor, no creation through this interface
68 ThreadSynchronizationInterface( ) { }
71 * Virtual protected destructor, no deletion through this interface
73 virtual ~ThreadSynchronizationInterface() { }
77 // Undefined copy constructor.
78 ThreadSynchronizationInterface( const ThreadSynchronizationInterface& );
80 // Undefined assignment operator.
81 ThreadSynchronizationInterface& operator=( const ThreadSynchronizationInterface& );
86 #endif // __DALI_INTEGRATION_THREAD_SYNCHRONIZATION_INTERFACE_H__