/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
#include <dali/internal/system/common/trigger-event.h>
#include <dali/internal/window-system/common/display-connection.h>
#include <dali/internal/graphics/gles/egl-graphics.h>
+#include <dali/internal/adaptor/common/adaptor-impl.h>
+#include <dali/internal/adaptor/common/adaptor-internal-services.h>
namespace Dali
PixmapRenderSurfaceEcoreX::~PixmapRenderSurfaceEcoreX()
{
+ DestroySurface();
+
// release the surface if we own one
if( mOwnSurface )
{
dpiVertical = int( yres + 0.5f );
}
-void PixmapRenderSurfaceEcoreX::InitializeGraphics( GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection )
+int PixmapRenderSurfaceEcoreX::GetOrientation() const
+{
+ return 0;
+}
+
+void PixmapRenderSurfaceEcoreX::InitializeGraphics()
{
- mGraphics = &graphics;
- mDisplayConnection = &displayConnection;
+ mGraphics = &mAdaptor->GetGraphicsInterface();
+ mDisplayConnection = &mAdaptor->GetDisplayConnectionInterface();
+
auto eglGraphics = static_cast<EglGraphics *>(mGraphics);
Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation();
// need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
XPixmap pixmap = static_cast<XPixmap>( mX11Pixmaps[i] );
eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[i] );
- eglImpl.DestroySurface();
+ eglImpl.DestroySurface( mEglSurfaces[i] );
}
}
}
}
-RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType()
+Integration::RenderSurface::Type PixmapRenderSurfaceEcoreX::GetSurfaceType()
+{
+ return Integration::RenderSurface::PIXMAP_RENDER_SURFACE;
+}
+
+void PixmapRenderSurfaceEcoreX::MakeContextCurrent()
{
- return RenderSurface::PIXMAP_RENDER_SURFACE;
}
void PixmapRenderSurfaceEcoreX::CreateRenderable()