#include <dali/integration-api/debug.h>
// INTERNAL HEADERS
-#include <dali/integration-api/x11/pixmap-render-surface.h>
+#include <dali/internal/window-system/ubuntu-x11/pixmap-render-surface-ecore-x.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
namespace Dali
{
}
DisplayConnectionX11::DisplayConnectionX11()
-: mDisplay(NULL)
+: mGraphics( nullptr ),
+ mDisplay( nullptr )
{
}
while (events > 0);
}
-bool DisplayConnectionX11::InitializeEgl(EglInterface& egl)
+bool DisplayConnectionX11::InitializeGraphics()
{
- EglImplementation& eglImpl = static_cast<EglImplementation&>(egl);
+ auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
+ EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
if (!eglImpl.InitializeGles(reinterpret_cast<EGLNativeDisplayType>(mDisplay)))
{
return true;
}
-void DisplayConnectionX11::SetSurfaceType( RenderSurface::Type type )
+void DisplayConnectionX11::SetSurfaceType( Integration::RenderSurface::Type type )
{
- if( type == RenderSurface::ECORE_RENDER_SURFACE )
+ if( type == Integration::RenderSurface::WINDOW_RENDER_SURFACE )
{
// Because of DDK issue, we need to use separated x display instead of ecore default display
mDisplay = XOpenDisplay(0);
}
}
-void DisplayConnectionX11::GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical)
+void DisplayConnectionX11::SetGraphicsInterface( GraphicsInterface& graphics )
{
- // calculate DPI
- float xres, yres;
-
- // 1 inch = 25.4 millimeters
- xres = ecore_x_dpi_get();
- yres = ecore_x_dpi_get();
-
- dpiHorizontal = int(xres + 0.5f); // rounding
- dpiVertical = int(yres + 0.5f);
+ mGraphics = &graphics;
}
} // namespace Adaptor