1 #ifndef TEST_REENDER_SURFACE_H
2 #define TEST_REENDER_SURFACE_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/dali-common.h>
23 #include <dali/integration-api/render-surface.h>
29 * Concrete implementation of the RenderSurface class.
31 class DALI_CORE_API TestRenderSurface : public Dali::Integration::RenderSurface
36 * @copydoc Dali::Integration::RenderSurface::RenderSurface
38 TestRenderSurface( Dali::PositionSize positionSize );
41 * @copydoc Dali::Integration::RenderSurface::~RenderSurface
43 virtual ~TestRenderSurface();
46 * @copydoc Dali::Integration::RenderSurface::GetPositionSize
48 virtual Dali::PositionSize GetPositionSize() const;
51 * @copydoc Dali::Integration::RenderSurface::GetDpi
53 virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
56 * @copydoc Dali::Integration::RenderSurface::GetOrientation
58 virtual int GetOrientation() const;
61 * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
63 virtual void InitializeGraphics();
66 * @copydoc Dali::Integration::RenderSurface::CreateSurface
68 virtual void CreateSurface();
71 * @copydoc Dali::Integration::RenderSurface::DestroySurface
73 virtual void DestroySurface();
76 * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
78 virtual bool ReplaceGraphicsSurface();
81 * @copydoc Dali::Integration::RenderSurface::MoveResize
83 virtual void MoveResize( Dali::PositionSize positionSize );
86 * @copydoc Dali::Integration::RenderSurface::StartRender
88 virtual void StartRender();
91 * @copydoc Dali::Integration::RenderSurface::PreRender
93 virtual bool PreRender( bool resizingSurface );
96 * @copydoc Dali::Integration::RenderSurface::PostRender
98 virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
101 * @copydoc Dali::Integration::RenderSurface::StopRender
103 virtual void StopRender();
106 * @copydoc Dali::Integration::RenderSurface::ReleaseLock
108 virtual void ReleaseLock();
111 * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
113 virtual Dali::Integration::RenderSurface::Type GetSurfaceType();
116 * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
118 virtual void MakeContextCurrent();
121 * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
123 virtual Integration::DepthBufferAvailable GetDepthBufferRequired();
126 * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
128 virtual Integration::StencilBufferAvailable GetStencilBufferRequired();
131 * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor
133 virtual void SetBackgroundColor( Vector4 color );
136 * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor
138 virtual Vector4 GetBackgroundColor();
141 * @copydoc Dali::Integration::RenderSurface::SetDamagedRect
143 virtual Rect<int32_t> SetDamagedRect( const Rect<int32_t>& damagedRectArray );
146 * @copydoc Dali::Integration::RenderSurface::GetBufferAge
148 virtual int32_t GetBufferAge();
153 * @brief Undefined copy constructor. RenderSurface cannot be copied
155 TestRenderSurface( const TestRenderSurface& rhs );
158 * @brief Undefined assignment operator. RenderSurface cannot be copied
160 TestRenderSurface& operator=( const TestRenderSurface& rhs );
164 Dali::PositionSize mPositionSize;
165 Vector4 mBackgroundColor; ///< The background color of the surface