Dali 3D User Interface Engine
thread-controller.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 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 
18 // CLASS HEADER
19 #include "thread-controller.h"
20 
21 // INTERNAL INCLUDES
27 
28 namespace Dali
29 {
30 
31 namespace Internal
32 {
33 
34 namespace Adaptor
35 {
36 
37 ThreadController::ThreadController( AdaptorInternalServices& adaptorInterfaces, const EnvironmentOptions& environmentOptions )
38 : mThreadControllerInterface( NULL )
39 {
40  switch( environmentOptions.GetThreadingMode() )
41  {
43  {
44  mThreadControllerInterface = new SeparateUpdateRenderController( adaptorInterfaces, environmentOptions );
45  break;
46  }
47 
49  {
50  mThreadControllerInterface = new CombinedUpdateRenderController( adaptorInterfaces, environmentOptions );
51  break;
52  }
53 
55  {
56  mThreadControllerInterface = new SingleThreadController( adaptorInterfaces, environmentOptions );
57  break;
58  }
59  }
60 }
61 
63 {
65 }
66 
68 {
70 }
71 
73 {
75 }
76 
78 {
80 }
81 
83 {
85 }
86 
88 {
90 }
91 
93 {
95 }
96 
98 {
100 }
101 
102 void ThreadController::ReplaceSurface( RenderSurface* newSurface )
103 {
105 }
106 
107 void ThreadController::SetRenderRefreshRate(unsigned int numberOfVSyncsPerRender )
108 {
109  mThreadControllerInterface->SetRenderRefreshRate( numberOfVSyncsPerRender );
110 }
111 
112 } // namespace Adaptor
113 
114 } // namespace Internal
115 
116 } // namespace Dali
Dali Docs Home
Read more about Dali