/*
- * 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 <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-
#include <X11/extensions/Xfixes.h> // for damage notify
#include <X11/extensions/Xdamage.h> // for damage notify
-
#include <dali/integration-api/gl-abstraction.h>
#include <dali/integration-api/debug.h>
#include <dali/devel-api/threading/mutex.h>
// INTERNAL INCLUDES
-#include <dali/integration-api/thread-synchronization-interface.h>
+#include <dali/integration-api/adaptor-framework/thread-synchronization-interface.h>
+#include <dali/internal/adaptor/common/adaptor-impl.h>
+#include <dali/internal/adaptor/common/adaptor-internal-services.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
#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>
-
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
{
- mGraphics = &graphics;
- mDisplayConnection = &displayConnection;
+ return 0;
+}
+
+void PixmapRenderSurfaceEcoreX::InitializeGraphics()
+{
+ 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()