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::InitializeGraphics
58 virtual void InitializeGraphics();
61 * @copydoc Dali::Integration::RenderSurface::CreateSurface
63 virtual void CreateSurface();
66 * @copydoc Dali::Integration::RenderSurface::DestroySurface
68 virtual void DestroySurface();
71 * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
73 virtual bool ReplaceGraphicsSurface();
76 * @copydoc Dali::Integration::RenderSurface::MoveResize
78 virtual void MoveResize( Dali::PositionSize positionSize );
81 * @copydoc Dali::Integration::RenderSurface::StartRender
83 virtual void StartRender();
86 * @copydoc Dali::Integration::RenderSurface::PreRender
88 virtual bool PreRender( bool resizingSurface );
91 * @copydoc Dali::Integration::RenderSurface::PostRender
93 virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
96 * @copydoc Dali::Integration::RenderSurface::StopRender
98 virtual void StopRender();
101 * @copydoc Dali::Integration::RenderSurface::ReleaseLock
103 virtual void ReleaseLock();
106 * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
108 virtual Dali::Integration::RenderSurface::Type GetSurfaceType();
111 * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
113 virtual void MakeContextCurrent();
116 * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
118 virtual Integration::DepthBufferAvailable GetDepthBufferRequired();
121 * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
123 virtual Integration::StencilBufferAvailable GetStencilBufferRequired();
126 * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor
128 virtual void SetBackgroundColor( Vector4 color );
131 * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor
133 virtual Vector4 GetBackgroundColor();
138 * @brief Undefined copy constructor. RenderSurface cannot be copied
140 TestRenderSurface( const TestRenderSurface& rhs );
143 * @brief Undefined assignment operator. RenderSurface cannot be copied
145 TestRenderSurface& operator=( const TestRenderSurface& rhs );
149 Dali::PositionSize mPositionSize;
150 Vector4 mBackgroundColor; ///< The background color of the surface