X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Ftizen-wayland%2Fnative-render-surface-ecore-wl.h;h=ea9c6d7dd144ce61148e5d082e001c94dee9daf4;hb=b120b6474d08f317c671299971dc3bd16d5bbd68;hp=4651c0f717af8bfab3c06067c24dd86a2fa73084;hpb=ee1898022ba5157cb467dc822cdac1a29712cba9;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h index 4651c0f..ea9c6d7 100644 --- a/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_NATIVE_SURFACE_ECORE_WL_H /* - * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,15 +21,20 @@ // EXTERNAL INCLUDES #include #include -#include #include // INTERNAL INCLUDES -#include +#include +#include +#include +#include namespace Dali { +class DisplayConnection; +class EglInterface; + /** * Ecore Wayland Native implementation of render surface. */ @@ -39,13 +44,11 @@ public: /** * Uses an Wayland surface to render to. - * @param [in] positionSize the position and size of the surface - * @param [in] name optional name of surface passed in + * @param [in] surfaceSize the size of the surface + * @param [in] surface the native surface handle * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit */ - NativeRenderSurfaceEcoreWl( Dali::PositionSize positionSize, - const std::string& name, - bool isTransparent = false ); + NativeRenderSurfaceEcoreWl( SurfaceSize surfaceSize, Any surface, bool isTransparent = false ); /** * @brief Destructor @@ -69,77 +72,92 @@ public: // from WindowRenderSurface */ virtual void WaitUntilSurfaceReplaced() override; -public: // from Dali::RenderSurface +public: // from Dali::RenderSurfaceInterface + + /** + * @copydoc Dali::RenderSurfaceInterface::GetPositionSize() + */ + virtual PositionSize GetPositionSize() const override; + + /** + * @copydoc Dali::RenderSurfaceInterface::GetDpi() + */ + virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override; + + /** + * @copydoc Dali::RenderSurfaceInterface::InitializeGraphics() + */ + virtual void InitializeGraphics() override; /** - * @copydoc Dali::RenderSurface::GetPositionSize() + * @copydoc Dali::RenderSurfaceInterface::CreateSurface() */ - virtual PositionSize GetPositionSize() const; + virtual void CreateSurface() override; /** - * @copydoc Dali::RenderSurface::InitializeEgl() + * @copydoc Dali::RenderSurfaceInterface::DestroySurface() */ - virtual void InitializeEgl( EglInterface& egl ); + virtual void DestroySurface() override; /** - * @copydoc Dali::RenderSurface::CreateEglSurface() + * @copydoc Dali::RenderSurfaceInterface::ReplaceGraphicsSurface() */ - virtual void CreateEglSurface( EglInterface& egl ); + virtual bool ReplaceGraphicsSurface() override; /** - * @copydoc Dali::RenderSurface::DestroyEglSurface() + * @copydoc Dali::RenderSurfaceInterface::MoveResize() */ - virtual void DestroyEglSurface( EglInterface& egl ); + virtual void MoveResize( Dali::PositionSize positionSize) override; /** - * @copydoc Dali::RenderSurface::ReplaceEGLSurface() + * @copydoc Dali::RenderSurfaceInterface::StartRender() */ - virtual bool ReplaceEGLSurface( EglInterface& egl ); + virtual void StartRender() override; /** - * @copydoc Dali::RenderSurface::MoveResize() + * @copydoc Dali::RenderSurfaceInterface::PreRender() */ - virtual void MoveResize( Dali::PositionSize positionSize); + virtual bool PreRender( bool resizingSurface, const std::vector>& damagedRects, Rect& clippingRect ) override; /** - * @copydoc Dali::RenderSurface::SetViewMode() + * @copydoc Dali::RenderSurfaceInterface::PostRender() */ - void SetViewMode( ViewMode viewMode ); + virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface, const std::vector>& damagedRects ) override; /** - * @copydoc Dali::RenderSurface::StartRender() + * @copydoc Dali::RenderSurfaceInterface::StopRender() */ - virtual void StartRender(); + virtual void StopRender() override; /** - * @copydoc Dali::RenderSurface::PreRender() + * @copydoc Dali::RenderSurfaceInterface::SetThreadSynchronization */ - virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, bool resizingSurface ); + virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization )override; /** - * @copydoc Dali::RenderSurface::PostRender() + * @copydoc Dali::RenderSurfaceInterface::GetSurfaceType() */ - virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface ); + virtual Dali::RenderSurfaceInterface::Type GetSurfaceType() override; /** - * @copydoc Dali::RenderSurface::StopRender() + * @copydoc Dali::RenderSurfaceInterface::MakeContextCurrent() */ - virtual void StopRender(); + virtual void MakeContextCurrent() override; /** - * @copydoc Dali::RenderSurface::SetThreadSynchronization + * @copydoc Dali::RenderSurfaceInterface::GetDepthBufferRequired() */ - virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ); + virtual Integration::DepthBufferAvailable GetDepthBufferRequired() override; /** - * @copydoc Dali::RenderSurface::GetSurfaceType() + * @copydoc Dali::RenderSurfaceInterface::GetStencilBufferRequired() */ - virtual RenderSurface::Type GetSurfaceType(); + virtual Integration::StencilBufferAvailable GetStencilBufferRequired() override; private: /** - * @copydoc Dali::RenderSurface::ReleaseLock() + * @copydoc Dali::RenderSurfaceInterface::ReleaseLock() */ virtual void ReleaseLock() override; @@ -155,18 +173,21 @@ private: private: // Data - PositionSize mPosition; - std::string mTitle; - TriggerEventInterface* mRenderNotification; - ColorDepth mColorDepth; - tbm_format mTbmFormat; - bool mOwnSurface; - bool mDrawableCompleted; - - tbm_surface_queue_h mTbmQueue; - tbm_surface_h mConsumeSurface; - ThreadSynchronizationInterface* mThreadSynchronization; ///< A pointer to the thread-synchronization - ConditionalWait mTbmSurfaceCondition; + SurfaceSize mSurfaceSize; + TriggerEventInterface* mRenderNotification; + Internal::Adaptor::GraphicsInterface* mGraphics; ///< The graphics interface + EglInterface* mEGL; + EGLSurface mEGLSurface; + EGLContext mEGLContext; + ColorDepth mColorDepth; + tbm_format mTbmFormat; + bool mOwnSurface; + bool mDrawableCompleted; + + tbm_surface_queue_h mTbmQueue; + tbm_surface_h mConsumeSurface; + ThreadSynchronizationInterface* mThreadSynchronization; ///< A pointer to the thread-synchronization + ConditionalWait mTbmSurfaceCondition; };