// INTERNAL INCLUDES
#include <ecore-wl-types.h>
#include <trigger-event.h>
+#include <gl/egl-implementation.h>
+#include <base/display-connection.h>
namespace Dali
{
-namespace Internal
-{
-
-namespace Adaptor
-{
-
#if defined(DEBUG_ENABLED)
extern Debug::Filter* gRenderSurfaceLogFilter;
#endif
WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
Any surface,
- Any display,
const std::string& name,
bool isTransparent)
-: RenderSurface( Dali::RenderSurface::WINDOW, positionSize, surface, display, name, isTransparent ),
+: EcoreWlRenderSurface( positionSize, surface, name, isTransparent ),
mNeedToApproveDeiconify(false)
{
DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" );
return mWlWindow;
}
-Dali::RenderSurface::SurfaceType WindowRenderSurface::GetType()
-{
- return Dali::RenderSurface::WINDOW;
-}
-
Any WindowRenderSurface::GetSurface()
{
// already an e-core type
{
DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
- EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
- eglImpl.InitializeGles( reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+ Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );
eglImpl.ChooseConfig(true, mColorDepth);
}
{
DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
- EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+ Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );
// create the EGL surface
ecore_wl_window_surface_create(mWlWindow);
{
DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
- EglImplementation& eglImpl = static_cast<EglImplementation&>( eglIf );
+ Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );
eglImpl.DestroySurface();
wl_egl_window_destroy(mEglWindow);
mEglWindow = NULL;
}
-bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& eglIf )
+bool WindowRenderSurface::ReplaceEGLSurface( EglInterface& egl )
{
DALI_LOG_TRACE_METHOD( gRenderSurfaceLogFilter );
- EglImplementation& egl = static_cast<EglImplementation&>( eglIf );
- egl.InitializeGles( reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
-
wl_egl_window_destroy(mEglWindow);
mEglWindow = wl_egl_window_create(ecore_wl_window_surface_get(mWlWindow), mPosition.width, mPosition.height);
- return egl.ReplaceSurfaceWindow( (EGLNativeWindowType)mEglWindow, // reinterpret_cast does not compile
- reinterpret_cast< EGLNativeDisplayType >( mMainDisplay ) );
+
+ Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
+ return eglImpl.ReplaceSurfaceWindow( (EGLNativeWindowType)mEglWindow ); // reinterpret_cast does not compile
}
void WindowRenderSurface::MoveResize( Dali::PositionSize positionSize )
return true;
}
-void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, unsigned int, bool )
+void WindowRenderSurface::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, unsigned int deltaTime, bool replacingSurface )
{
- EglImplementation& eglImpl = static_cast<EglImplementation&>( egl );
+ Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
eglImpl.SwapBuffers();
// When the window is deiconified, it approves the deiconify operation to window manager after rendering
// SwapBuffer is desychronized. So make sure to sychronize when window is deiconified.
glAbstraction.Finish();
+ //FIXME
+
mNeedToApproveDeiconify = false;
}
}
void WindowRenderSurface::SetViewMode( ViewMode viewMode )
{
+ //FIXME
}
void WindowRenderSurface::CreateWlRenderable()
{
DALI_ASSERT_ALWAYS(0 && "Failed to create X window");
}
+
+ //FIXME
}
void WindowRenderSurface::UseExistingRenderable( unsigned int surfaceId )
} // namespace ECore
-} // namespace Adaptor
-
-} // namespace Internal
-
} // namespace Dali