Removed GL and GL Sync implementations
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.cpp
index 131a611..06ffb2a 100755 (executable)
@@ -24,7 +24,6 @@
 #include <dali/devel-api/actors/actor-devel.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/core.h>
-#include <dali/integration-api/context-notifier.h>
 #include <dali/integration-api/profiling.h>
 #include <dali/integration-api/input-options.h>
 #include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/internal/accessibility/common/accessibility-adaptor-impl.h>
 #include <dali/internal/input/common/gesture-manager.h>
 #include <dali/internal/window-system/common/event-handler.h>
-#include <dali/internal/graphics/gles20/gl-proxy-implementation.h>
-#include <dali/internal/graphics/gles20/gl-implementation.h>
-#include <dali/internal/graphics/gles20/egl-sync-implementation.h>
 #include <dali/internal/graphics/common/egl-image-extensions.h>
 #include <dali/internal/graphics/gles20/egl-factory.h>
+#include <dali/internal/graphics/vulkan/x11/vk-surface-xlib2xcb.h>
 #include <dali/internal/clipboard/common/clipboard-impl.h>
 #include <dali/internal/graphics/common/vsync-monitor.h>
 #include <dali/internal/system/common/object-profiler.h>
@@ -133,35 +130,28 @@ void Adaptor::Initialize( Dali::Configuration::ContextLoss configuration )
 
   mGestureManager = new GestureManager(*this, Vector2(size.width, size.height), mCallbackManager, *mEnvironmentOptions);
 
-  if( mEnvironmentOptions->GetGlesCallTime() > 0 )
-  {
-    mGLES = new GlProxyImplementation( *mEnvironmentOptions );
-  }
-  else
-  {
-    mGLES = new GlImplementation();
-  }
-
   const Integration::DepthBufferAvailable depthBufferAvailable = static_cast< Integration::DepthBufferAvailable >( mEnvironmentOptions->DepthBufferRequired() );
   const Integration::StencilBufferAvailable stencilBufferAvailable = static_cast< Integration::StencilBufferAvailable >( mEnvironmentOptions->StencilBufferRequired() );
 
   mEglFactory = new EglFactory( mEnvironmentOptions->GetMultiSamplingLevel(), depthBufferAvailable, stencilBufferAvailable );
 
-  EglSyncImplementation* eglSyncImpl = mEglFactory->GetSyncImplementation();
-
-  // todo: add somewhere MakeUnique to make it cleaner
+  // @todo: add somewhere MakeUnique to make it cleaner
   mGraphics = std::unique_ptr<Dali::Integration::Graphics::Graphics>(
     new Dali::Integration::Graphics::Graphics()
   );
 
-  // todo: surface shouldn't really be create here :((((
+  // @todo: surface shouldn't really be create here :((((
   auto xlibSurface = std::unique_ptr<Dali::Graphics::Vulkan::VkSurfaceXlib2Xcb>(
     new Dali::Graphics::Vulkan::VkSurfaceXlib2Xcb( *mSurface )
   );
 
   mGraphics->Create( std::move(xlibSurface) );
 
-  mCore = Integration::Core::New( *this, *mPlatformAbstraction, *mGraphics, *mGLES, *eglSyncImpl, *mGestureManager, dataRetentionPolicy,
+  mCore = Integration::Core::New( *this,
+                                  *mPlatformAbstraction,
+                                  *mGraphics,
+                                  *mGestureManager,
+                                  dataRetentionPolicy ,
                                   ( 0u != mEnvironmentOptions->GetRenderToFboInterval() ) ? Integration::RenderToFrameBuffer::TRUE : Integration::RenderToFrameBuffer::FALSE,
                                   depthBufferAvailable,
                                   stencilBufferAvailable );
@@ -273,7 +263,6 @@ Adaptor::~Adaptor()
 
   delete mCore;
   delete mEglFactory;
-  delete mGLES;
   delete mGestureManager;
   delete mPlatformAbstraction;
   delete mCallbackManager;
@@ -424,19 +413,6 @@ void Adaptor::Stop()
   }
 }
 
-void Adaptor::ContextLost()
-{
-  mCore->GetContextNotifier()->NotifyContextLost(); // Inform stage
-}
-
-void Adaptor::ContextRegained()
-{
-  // Inform core, so that texture resources can be reloaded
-  mCore->RecoverFromContextLoss();
-
-  mCore->GetContextNotifier()->NotifyContextRegained(); // Inform stage
-}
-
 void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp )
 {
   mEventHandler->FeedTouchPoint( point, timeStamp );
@@ -553,13 +529,7 @@ EglFactoryInterface& Adaptor::GetEGLFactoryInterface() const
   return *mEglFactory;
 }
 
-Integration::GlAbstraction& Adaptor::GetGlAbstraction() const
-{
-  DALI_ASSERT_DEBUG( mGLES && "GLImplementation not created" );
-  return *mGLES;
-}
-
-Dali::Integration::Graphics::Graphics& Adaptor::GetGraphics() const
+Integration::Graphics::Graphics& Adaptor::GetGraphics() const
 {
   return *mGraphics;
 }
@@ -569,11 +539,6 @@ Dali::Integration::PlatformAbstraction& Adaptor::GetPlatformAbstractionInterface
   return *mPlatformAbstraction;
 }
 
-Dali::Integration::GlAbstraction& Adaptor::GetGlesInterface()
-{
-  return *mGLES;
-}
-
 TriggerEventInterface& Adaptor::GetProcessCoreEventsTrigger()
 {
   return *mNotificationTrigger;
@@ -861,8 +826,6 @@ Adaptor::Adaptor(Any nativeWindow, Dali::Adaptor& adaptor, RenderSurface* surfac
   mCore( NULL ),
   mThreadController( NULL ),
   mVSyncMonitor( NULL ),
-  mGLES( NULL ),
-  mGlSync( NULL ),
   mEglFactory( NULL ),
   mNativeWindow( nativeWindow ),
   mSurface( surface ),