1 #ifndef __DALI_INTERNAL_MULTI_THREAD_CONTROLLER_H__
2 #define __DALI_INTERNAL_MULTI_THREAD_CONTROLLER_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.
22 #include <base/thread-controller-interface.h>
38 class ThreadSynchronization;
39 class AdaptorInternalServices;
40 class EnvironmentOptions;
43 * Class to control multiple threads:
49 class SeparateUpdateRenderController : public ThreadControllerInterface
56 SeparateUpdateRenderController( AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions );
59 * Non virtual destructor. Not intended as base class.
61 ~SeparateUpdateRenderController();
64 * @copydoc ThreadControllerInterface::Initialize()
69 * @copydoc ThreadControllerInterface::Start()
74 * @copydoc ThreadControllerInterface::Pause()
79 * @copydoc ThreadControllerInterface::Resume()
84 * @copydoc ThreadControllerInterface::Stop()
89 * @copydoc ThreadControllerInterface::RequestUpdate()
94 * @copydoc ThreadControllerInterface::RequestUpdateOnce()
96 void RequestUpdateOnce();
99 * @copydoc ThreadControllerInterface::ReplaceSurface()
101 void ReplaceSurface( RenderSurface* surface );
104 * @copydoc ThreadControllerInterface::SetRenderRefreshRate()
106 void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender );
110 // Undefined copy constructor.
111 SeparateUpdateRenderController( const SeparateUpdateRenderController& );
113 // Undefined assignment operator.
114 SeparateUpdateRenderController& operator=( const SeparateUpdateRenderController& );
116 AdaptorInternalServices& mAdaptorInterfaces;
118 UpdateThread* mUpdateThread; ///< The update-thread owned by SeparateUpdateRenderController
119 RenderThread* mRenderThread; ///< The render-thread owned by SeparateUpdateRenderController
120 VSyncNotifier* mVSyncNotifier; ///< The vsync-thread owned by SeparateUpdateRenderController
121 ThreadSynchronization* mThreadSync; ///< Used to synchronize all the threads; owned by SeparateUpdateRenderController
122 unsigned int mNumberOfVSyncsPerRender; ///< Frame skipping count
125 } // namespace Adaptor
127 } // namespace Internal
131 #endif // __DALI_INTERNAL_MULTI_THREAD_CONTROLLER_H__