Merge "Unparents internalRoot actor when gaussian-blur-view is deactived." into devel...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-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::InitializeGraphics
57    */
58   virtual void InitializeGraphics();
59
60   /**
61    * @copydoc Dali::Integration::RenderSurface::CreateSurface
62    */
63   virtual void CreateSurface();
64
65   /**
66    * @copydoc Dali::Integration::RenderSurface::DestroySurface
67    */
68   virtual void DestroySurface();
69
70   /**
71    * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
72    */
73   virtual bool ReplaceGraphicsSurface();
74
75   /**
76    * @copydoc Dali::Integration::RenderSurface::MoveResize
77    */
78   virtual void MoveResize( Dali::PositionSize positionSize );
79
80   /**
81    * @copydoc Dali::Integration::RenderSurface::StartRender
82    */
83   virtual void StartRender();
84
85   /**
86    * @copydoc Dali::Integration::RenderSurface::PreRender
87    */
88   virtual bool PreRender( bool resizingSurface );
89
90   /**
91    * @copydoc Dali::Integration::RenderSurface::PostRender
92    */
93   virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
94
95   /**
96    * @copydoc Dali::Integration::RenderSurface::StopRender
97    */
98   virtual void StopRender();
99
100   /**
101    * @copydoc Dali::Integration::RenderSurface::ReleaseLock
102    */
103   virtual void ReleaseLock();
104
105   /**
106    * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
107    */
108   virtual Dali::Integration::RenderSurface::Type GetSurfaceType();
109
110   /**
111    * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
112    */
113   virtual void MakeContextCurrent();
114
115   /**
116    * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
117    */
118   virtual Integration::DepthBufferAvailable GetDepthBufferRequired();
119
120   /**
121    * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
122    */
123   virtual Integration::StencilBufferAvailable GetStencilBufferRequired();
124
125   /**
126    * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor
127    */
128   virtual void SetBackgroundColor( Vector4 color );
129
130   /**
131    * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor
132    */
133   virtual Vector4 GetBackgroundColor();
134
135 private:
136
137   /**
138    * @brief Undefined copy constructor. RenderSurface cannot be copied
139    */
140   TestRenderSurface( const TestRenderSurface& rhs );
141
142   /**
143    * @brief Undefined assignment operator. RenderSurface cannot be copied
144    */
145   TestRenderSurface& operator=( const TestRenderSurface& rhs );
146
147 private:
148
149   Dali::PositionSize mPositionSize;
150   Vector4 mBackgroundColor;                                     ///< The background color of the surface
151 };
152
153 } // Dali
154
155 #endif