Revert "[Tizen] Do not skip rendering if update required keep rendering"
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-internal-services.h
1 #ifndef DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H
2 #define DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H
3
4 /*
5  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/integration-api/core.h>
23 #include <dali/integration-api/gl-abstraction.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/devel-api/adaptor-framework/texture-upload-manager.h>
27 #include <dali/integration-api/adaptor-framework/render-surface-interface.h>
28 #include <dali/integration-api/adaptor-framework/trigger-event-interface.h>
29 #include <dali/internal/graphics/common/graphics-interface.h>
30 #include <dali/internal/graphics/gles/egl-factory-interface.h>
31 #include <dali/internal/network/common/socket-factory-interface.h>
32 #include <dali/internal/network/common/trace-interface.h>
33 #include <dali/internal/system/common/performance-interface.h>
34 #include <dali/internal/window-system/common/display-connection.h>
35
36 namespace Dali
37 {
38 namespace Internal
39 {
40 namespace Adaptor
41 {
42 class SceneHolder;
43 using WindowContainer = std::vector<Internal::Adaptor::SceneHolder*>;
44
45 /**
46  * A class to contain various interfaces provided by the adaptor which
47  * can be used by the cross platform parts of adaptor.
48  * E.g. any files held in adaptors/base/ directory
49  *
50  */
51 class AdaptorInternalServices
52 {
53 public:
54   /**
55    * @return core
56    */
57   virtual Dali::Integration::Core& GetCore() = 0;
58
59   /**
60    * @return platform abstraction
61    */
62   virtual Dali::Integration::PlatformAbstraction& GetPlatformAbstractionInterface() = 0;
63
64   /**
65    * Used to access the Display Connection interface from the Render thread
66    * @return the Display Connection interface
67    */
68   virtual Dali::DisplayConnection& GetDisplayConnectionInterface() = 0;
69
70   /**
71    * Used to access the abstracted graphics interface
72    * This also contains the depth and stencil buffers
73    * @return the graphics interface
74    */
75   virtual GraphicsInterface& GetGraphicsInterface() = 0;
76
77   /**
78    * Used by update-thread to notify core (main-thread) it has messages to process
79    * @return trigger event ProcessCoreEvents
80    */
81   virtual TriggerEventInterface& GetProcessCoreEventsTrigger() = 0;
82
83   /**
84    * @return socket factory interface
85    */
86   virtual SocketFactoryInterface& GetSocketFactoryInterface() = 0;
87
88   /**
89    * @return render surface
90    */
91   virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface() = 0;
92
93   /**
94    * @return performance interface
95    */
96   virtual PerformanceInterface* GetPerformanceInterface() = 0;
97
98   /**
99    * @return interface for logging to the kernel ( e.g. using ftrace )
100    */
101   virtual TraceInterface& GetKernelTraceInterface() = 0;
102
103   /**
104    * @return system trace interface, e.g. for using Tizen Trace (ttrace) or Android Trace (atrace)
105    */
106   virtual TraceInterface& GetSystemTraceInterface() = 0;
107
108   /**
109    * @return texture upload manager
110    */
111   virtual Devel::TextureUploadManager& GetTextureUploadManager() = 0;
112
113   /**
114    * Used to access the list of windows from the Render thread
115    * @param[out] windows The list of created windows
116    */
117   virtual void GetWindowContainerInterface(WindowContainer& windows) = 0;
118
119 protected:
120   /**
121    * constructor
122    */
123   AdaptorInternalServices(){};
124
125   /**
126    * virtual destructor
127    */
128   virtual ~AdaptorInternalServices(){};
129
130   // Undefined copy constructor.
131   AdaptorInternalServices(const AdaptorInternalServices&) = delete;
132
133   // Undefined assignment operator.
134   AdaptorInternalServices& operator=(const AdaptorInternalServices&) = delete;
135 };
136
137 } // namespace Adaptor
138
139 } // namespace Internal
140
141 } // namespace Dali
142
143 #endif // DALI_INTERNAL_ADAPTOR_INTERNAL_SERVICES_H