Revert "[Tizen] Add OffscreenApplication"
[platform/core/uifw/dali-adaptor.git] / dali / integration-api / adaptor-framework / native-render-surface.h
1 #ifndef DALI_NATIVE_RENDER_SURFACE_H
2 #define DALI_NATIVE_RENDER_SURFACE_H
3
4 /*
5  * Copyright (c) 2020 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 // INTERNAL INCLUDES
22 #include <dali/integration-api/adaptor-framework/render-surface-interface.h>
23 #include <dali/public-api/dali-adaptor-common.h>
24
25 namespace Dali
26 {
27 class TriggerEventInterface;
28
29 /**
30  * Native interface of render surface.
31  */
32 class DALI_ADAPTOR_API NativeRenderSurface : public Dali::RenderSurfaceInterface
33 {
34 public:
35   /**
36    * @brief Default constructor
37    */
38   NativeRenderSurface() = default;
39
40   /**
41    * @brief Destructor
42    */
43   virtual ~NativeRenderSurface() = default;
44
45 public: // API
46   /**
47    * @brief Get the render surface the adaptor is using to render to.
48    * @return reference to current render surface
49    */
50   virtual Any GetDrawable() = 0;
51
52   /**
53    * @brief Sets the render notification trigger to call when render thread is completed a frame
54    * @param renderNotification to use
55    */
56   virtual void SetRenderNotification(TriggerEventInterface* renderNotification) = 0;
57
58   /**
59    * @brief Waits until surface is replaced
60    * After tbm surface is acquired in PostRender, this function is finished.
61    */
62   virtual void WaitUntilSurfaceReplaced() = 0;
63
64 private: // from NativeRenderSurface
65   /**
66    * @brief Create a renderable
67    */
68   virtual void CreateNativeRenderable() = 0;
69
70   /**
71    * @brief Release a drawable
72    */
73   virtual void ReleaseDrawable() = 0;
74
75 protected:
76   // Undefined
77   NativeRenderSurface(const NativeRenderSurface&) = delete;
78
79   // Undefined
80   NativeRenderSurface& operator=(const NativeRenderSurface& rhs) = delete;
81 };
82
83 } // namespace Dali
84
85 #endif // DALI_NATIVE_RENDER_SURFACE_H