// CLASS HEADER
#include <dali/internal/window-system/tizen-wayland/display-connection-impl-ecore-wl.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
// EXTERNAL_HEADERS
+#include <tbm_dummy_display.h>
#include <dali/integration-api/debug.h>
#ifdef ECORE_WAYLAND2
DisplayConnectionEcoreWl::DisplayConnectionEcoreWl()
: mDisplay( NULL ),
- mSurfaceType( RenderSurface::WINDOW_RENDER_SURFACE )
+ mSurfaceType( Integration::RenderSurface::WINDOW_RENDER_SURFACE ),
+ mGraphics( nullptr )
{
}
DisplayConnectionEcoreWl::~DisplayConnectionEcoreWl()
{
- if( mSurfaceType == RenderSurface::NATIVE_RENDER_SURFACE )
+ if( mSurfaceType == Integration::RenderSurface::NATIVE_RENDER_SURFACE )
{
ReleaseNativeDisplay();
}
{
}
-bool DisplayConnectionEcoreWl::InitializeEgl(EglInterface& egl)
+bool DisplayConnectionEcoreWl::InitializeGraphics()
{
- EglImplementation& eglImpl = static_cast<EglImplementation&>(egl);
+ auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
+ EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
if( !eglImpl.InitializeGles( mDisplay ) )
{
return true;
}
-void DisplayConnectionEcoreWl::SetSurfaceType( RenderSurface::Type type )
+void DisplayConnectionEcoreWl::SetSurfaceType( Integration::RenderSurface::Type type )
{
mSurfaceType = type;
- if( mSurfaceType == RenderSurface::NATIVE_RENDER_SURFACE )
+ if( mSurfaceType == Integration::RenderSurface::NATIVE_RENDER_SURFACE )
{
mDisplay = GetNativeDisplay();
}
}
}
+void DisplayConnectionEcoreWl::SetGraphicsInterface( GraphicsInterface& graphics )
+{
+ mGraphics = &graphics;
+}
+
EGLNativeDisplayType DisplayConnectionEcoreWl::GetNativeDisplay()
{
- return EGLNativeDisplayType();
+ return reinterpret_cast< EGLNativeDisplayType >( tbm_dummy_display_create() );
}
void DisplayConnectionEcoreWl::ReleaseNativeDisplay()
{
-
+ if( mDisplay )
+ {
+ tbm_dummy_display_destroy( reinterpret_cast< tbm_dummy_display* >( mDisplay ) );
+ }
}
} // namespace Adaptor