1 #ifndef __DALI_INTERNAL_UPDATE_RENDER_CONTROLLER_H__
2 #define __DALI_INTERNAL_UPDATE_RENDER_CONTROLLER_H__
5 * Copyright (c) 2014 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.
33 class UpdateRenderSynchronization;
35 class AdaptorInternalServices;
36 class EnvironmentOptions;
39 * Class to control the update and render threads.
41 class UpdateRenderController
48 UpdateRenderController( AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions );
51 * Non virtual destructor. Not intended as base class.
53 ~UpdateRenderController();
56 * @copydoc Dali::Adaptor::Start()
61 * @copydoc Dali::Adaptor::Pause()
66 * @copydoc Dali::Adaptor::Resume()
71 * @copydoc Dali::Adaptor::Stop()
76 * Called by the adaptor when core requires another update
81 * Called by the adaptor when core requires one update
82 * If Adaptor is paused, we do one update and return to pause
84 void RequestUpdateOnce();
87 * Replaces the surface.
88 * @param surface new surface
90 void ReplaceSurface( RenderSurface* surface );
93 * @copydoc Dali::Adaptor::RenderSync()
98 * @copydoc Dali::Internal::Adaptor::RenderSync()
104 // Undefined copy constructor.
105 UpdateRenderController( const UpdateRenderController& );
107 // Undefined assignment operator.
108 UpdateRenderController& operator=( const UpdateRenderController& );
110 UpdateThread* mUpdateThread; ///< The update-thread owned by UpdateRenderController
111 RenderThread* mRenderThread; ///< The render-thread owned by UpdateRenderController
112 VSyncNotifier* mVSyncNotifier; ///< The vsync-thread owned by UpdateRenderController
113 UpdateRenderSynchronization* mUpdateRenderSync; ///< Used to synchronize the update & render threads; also owned by UpdateRenderController
116 } // namespace Adaptor
118 } // namespace Internal
122 #endif // __DALI_INTERNAL_UPDATE_RENDER_CONTROLLER_H__