1 #ifndef __DALI_INTERNAL_RENDER_HELPER_H__
2 #define __DALI_INTERNAL_RENDER_HELPER_H__
5 * Copyright (c) 2015 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 <egl-interface.h>
23 #include <render-surface.h> // needed for Dali::RenderSurface
29 class DisplayConnection;
41 class AdaptorInternalServices;
42 class EglFactoryInterface;
45 * Helper class for EGL, surface, pre & post rendering
52 * Create a RenderHelper.
53 * @param[in] adaptorInterfaces base adaptor interface
55 RenderHelper( AdaptorInternalServices& adaptorInterfaces );
58 * Non-virtual Destructor
62 /////////////////////////////////////////////////////////////////////////////////////////////////
63 // Called on the Event Thread
64 /////////////////////////////////////////////////////////////////////////////////////////////////
67 * Sets up all render related objects to start rendering.
72 * Sets up all render related objects to stop rendering.
76 /////////////////////////////////////////////////////////////////////////////////////////////////
77 // Called on the Rendering Thread
78 /////////////////////////////////////////////////////////////////////////////////////////////////
81 * Consumes any pending events to avoid memory leaks
83 * @note Called from rendering thread
90 * @note Called from rendering thread
95 * Replaces the rendering surface
97 * Used for replacing pixmaps due to resizing
98 * @param newSurface to use
100 * @note Called from render thread
102 void ReplaceSurface( RenderSurface* newSurface );
107 * @note Called from render thread
112 * Called before core renders the scene
114 * @return true if successful and Core::Render should be called.
116 * @note Called from render thread
121 * Called after core has rendered the scene
123 * @note Called from render thread
130 RenderHelper( const RenderHelper& RenderHelper );
133 RenderHelper& operator=( const RenderHelper& RenderHelper );
137 Integration::GlAbstraction& mGLES; ///< GL abstraction reference
138 EglFactoryInterface* mEglFactory; ///< Factory class to create EGL implementation
139 EglInterface* mEGL; ///< Interface to EGL implementation
140 RenderSurface* mSurface; ///< Current surface
141 Dali::DisplayConnection* mDisplayConnection; ///< Display connection
142 bool mSurfaceReplaced; ///< True when new surface has been initialized.
145 } // namespace Adaptor
147 } // namespace Internal
151 #endif // __DALI_INTERNAL_RENDER_HELPER_H__