1 #ifndef __DALI_ECORE_X_PIXMAP_RENDER_SURFACE_H__
2 #define __DALI_ECORE_X_PIXMAP_RENDER_SURFACE_H__
5 * Copyright (c) 2014 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 <ecore-wl-render-surface.h>
31 * Ecore X11 implementation of render surface.
33 class PixmapRenderSurface : public EcoreWlRenderSurface
38 * Uses an Wayland surface to render to.
39 * @param [in] positionSize the position and size of the surface
40 * @param [in] surface can be a Wayland-window (type must be unsigned int).
41 * @param [in] name optional name of surface passed in
42 * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
44 PixmapRenderSurface( Dali::PositionSize positionSize,
46 const std::string& name,
47 bool isTransparent = false);
50 * @copydoc Dali::RenderSurface::~RenderSurface
52 virtual ~PixmapRenderSurface();
57 * @copydoc Dali::ECore::EcoreWlRenderSurface::GetDrawable()
59 virtual Ecore_Wl_Window* GetDrawable();
66 virtual Any GetSurface();
68 public: // from Dali::RenderSurface
71 * @copydoc Dali::RenderSurface::InitializeEgl()
73 virtual void InitializeEgl( EglInterface& egl );
76 * @copydoc Dali::RenderSurface::CreateEglSurface()
78 virtual void CreateEglSurface( EglInterface& egl );
81 * @copydoc Dali::RenderSurface::DestroyEglSurface()
83 virtual void DestroyEglSurface( EglInterface& egl );
86 * @copydoc Dali::RenderSurface::ReplaceEGLSurface()
88 virtual bool ReplaceEGLSurface( EglInterface& egl );
91 * @copydoc Dali::RenderSurface::StartRender()
93 virtual void StartRender();
96 * @copydoc Dali::RenderSurface::PreRender()
98 virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
101 * @copydoc Dali::RenderSurface::PostRender()
103 virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, unsigned int deltaTime, bool replacingSurface );
106 * @copydoc Dali::RenderSurface::StopRender()
108 virtual void StopRender();
119 * @param[in] syncMode The sync mode
121 void SetSyncMode( SyncMode syncMode );
124 * If sync mode is WAIT, then acquire a lock. This prevents render thread from
125 * continuing until the pixmap has been drawn by the compositor.
126 * It must be released for rendering to continue.
127 * @param[in] syncMode The current sync mode
129 void AcquireLock( SyncMode syncMode );
139 virtual void CreateWlRenderable();
142 * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
144 virtual void UseExistingRenderable( unsigned int surfaceId );
154 #endif // __DALI_ECORE_X_PIXMAP_RENDER_SURFACE_H__