1 #ifndef __DALI_INTERNAL_ECORE_X_PIXMAP_RENDER_SURFACE_H__
2 #define __DALI_INTERNAL_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-x-render-surface.h>
38 * Ecore X11 implementation of render surface.
40 class PixmapRenderSurface : public RenderSurface
45 * Uses an X11 surface to render to.
46 * @param [in] positionSize the position and size of the surface
47 * @param [in] surface can be a X-window or X-pixmap (type must be unsigned int).
48 * @param [in] display connection to X-server if the surface is a X window or pixmap (type must be void * to X display struct)
49 * @param [in] name optional name of surface passed in
50 * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
52 PixmapRenderSurface( Dali::PositionSize positionSize,
55 const std::string& name,
56 bool isTransparent = false);
59 * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::~RenderSurface
61 virtual ~PixmapRenderSurface();
66 * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::GetDrawable()
68 virtual Ecore_X_Drawable GetDrawable();
70 public: // from Dali::RenderSurface
73 * @copydoc Dali::RenderSurface::GetType()
75 virtual Dali::RenderSurface::SurfaceType GetType();
78 * @copydoc Dali::RenderSurface::GetSurface()
80 virtual Any GetSurface();
82 public: // from Internal::Adaptor::RenderSurface
85 * @copydoc Dali::Internal::Adaptor::RenderSurface::InitializeEgl()
87 virtual void InitializeEgl( EglInterface& egl );
90 * @copydoc Dali::Internal::Adaptor::RenderSurface::CreateEglSurface()
92 virtual void CreateEglSurface( EglInterface& egl );
95 * @copydoc Dali::Internal::Adaptor::RenderSurface::DestroyEglSurface()
97 virtual void DestroyEglSurface( EglInterface& egl );
100 * @copydoc Dali::Internal::Adaptor::RenderSurface::ReplaceEGLSurface()
102 virtual bool ReplaceEGLSurface( EglInterface& egl );
105 * @copydoc Dali::Internal::Adaptor::RenderSurface::RenderSync()
107 virtual void RenderSync();
110 * @copydoc Dali::Internal::Adaptor::RenderSurface::PreRender()
112 virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction );
115 * @copydoc Dali::Internal::Adaptor::RenderSurface::PostRender()
117 virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int timeDelta, SyncMode syncMode );
124 virtual void CreateXRenderable();
127 * @copydoc Dali::Internal::Adaptor::ECore::RenderSurface::UseExistingRenderable
129 virtual void UseExistingRenderable( unsigned int surfaceId );
133 Ecore_X_Pixmap mX11Pixmap; ///< X-Pixmap
139 } // namespace Adaptor
141 } // namespace internal
145 #endif // __DALI_INTERNAL_ECORE_X_PIXMAP_RENDER_SURFACE_H__