[Tizen] Implement partial update
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / dali-test-suite-utils / test-render-surface.h
1 #ifndef TEST_REENDER_SURFACE_H
2 #define TEST_REENDER_SURFACE_H
3
4 /*
5  * Copyright (c) 2019 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/public-api/common/dali-common.h>
23 #include <dali/integration-api/render-surface.h>
24
25 namespace Dali
26 {
27
28 /**
29  * Concrete implementation of the RenderSurface class.
30  */
31 class DALI_CORE_API TestRenderSurface : public Dali::Integration::RenderSurface
32 {
33 public:
34
35   /**
36    * @copydoc Dali::Integration::RenderSurface::RenderSurface
37    */
38   TestRenderSurface( Dali::PositionSize positionSize );
39
40   /**
41    * @copydoc Dali::Integration::RenderSurface::~RenderSurface
42    */
43   virtual ~TestRenderSurface();
44
45   /**
46    * @copydoc Dali::Integration::RenderSurface::GetPositionSize
47    */
48   virtual Dali::PositionSize GetPositionSize() const;
49
50   /**
51    * @copydoc Dali::Integration::RenderSurface::GetDpi
52    */
53   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
54
55   /**
56    * @copydoc Dali::Integration::RenderSurface::GetOrientation
57    */
58   virtual int GetOrientation() const;
59
60   /**
61    * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
62    */
63   virtual void InitializeGraphics();
64
65   /**
66    * @copydoc Dali::Integration::RenderSurface::CreateSurface
67    */
68   virtual void CreateSurface();
69
70   /**
71    * @copydoc Dali::Integration::RenderSurface::DestroySurface
72    */
73   virtual void DestroySurface();
74
75   /**
76    * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
77    */
78   virtual bool ReplaceGraphicsSurface();
79
80   /**
81    * @copydoc Dali::Integration::RenderSurface::MoveResize
82    */
83   virtual void MoveResize( Dali::PositionSize positionSize );
84
85   /**
86    * @copydoc Dali::Integration::RenderSurface::StartRender
87    */
88   virtual void StartRender();
89
90   /**
91    * @copydoc Dali::Integration::RenderSurface::PreRender
92    */
93   virtual bool PreRender( bool resizingSurface );
94
95   /**
96    * @copydoc Dali::Integration::RenderSurface::PostRender
97    */
98   virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
99
100   /**
101    * @copydoc Dali::Integration::RenderSurface::StopRender
102    */
103   virtual void StopRender();
104
105   /**
106    * @copydoc Dali::Integration::RenderSurface::ReleaseLock
107    */
108   virtual void ReleaseLock();
109
110   /**
111    * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
112    */
113   virtual Dali::Integration::RenderSurface::Type GetSurfaceType();
114
115   /**
116    * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
117    */
118   virtual void MakeContextCurrent();
119
120   /**
121    * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
122    */
123   virtual Integration::DepthBufferAvailable GetDepthBufferRequired();
124
125   /**
126    * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
127    */
128   virtual Integration::StencilBufferAvailable GetStencilBufferRequired();
129
130   /**
131    * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor
132    */
133   virtual void SetBackgroundColor( Vector4 color );
134
135   /**
136    * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor
137    */
138   virtual Vector4 GetBackgroundColor();
139
140   /**
141    * @copydoc Dali::Integration::RenderSurface::SetDamagedRect
142    */
143   virtual Rect<int32_t> SetDamagedRect( Rect<int32_t> damagedRectArray );
144
145   /**
146    * @copydoc Dali::Integration::RenderSurface::GetBufferAge
147    */
148   virtual int32_t GetBufferAge();
149
150 private:
151
152   /**
153    * @brief Undefined copy constructor. RenderSurface cannot be copied
154    */
155   TestRenderSurface( const TestRenderSurface& rhs );
156
157   /**
158    * @brief Undefined assignment operator. RenderSurface cannot be copied
159    */
160   TestRenderSurface& operator=( const TestRenderSurface& rhs );
161
162 private:
163
164   Dali::PositionSize mPositionSize;
165   Vector4 mBackgroundColor;                                     ///< The background color of the surface
166 };
167
168 } // Dali
169
170 #endif