Revert "[Tizen] Revert "Support multiple window rendering""
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor.cpp
old mode 100644 (file)
new mode 100755 (executable)
index b8cf1b1..66b28ee
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 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.
@@ -23,9 +23,8 @@
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
-#include <dali/devel-api/adaptor-framework/imf-manager.h>
 #include <dali/devel-api/adaptor-framework/style-monitor.h>
-#include <dali/devel-api/adaptor-framework/render-surface.h>
+#include <dali/integration-api/render-surface.h>
 #include <dali/internal/adaptor/common/adaptor-impl.h>
 
 namespace Dali
@@ -42,14 +41,14 @@ Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
   return *adaptor;
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface )
 {
   return New( nativeWindow, surface, Configuration::APPLICATION_DOES_NOT_HANDLE_CONTEXT_LOSS );
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration )
 {
-  Dali::RenderSurface* pSurface = const_cast<Dali::RenderSurface *>(&surface);
+  Dali::RenderSurfaceInterface* pSurface = const_cast<Dali::RenderSurfaceInterface *>(&surface);
   Adaptor* adaptor = Internal::Adaptor::Adaptor::New( nativeWindow, pSurface, configuration, NULL );
   return *adaptor;
 }
@@ -79,9 +78,9 @@ void Adaptor::Stop()
   mImpl->Stop();
 }
 
-bool Adaptor::AddIdle( CallbackBase* callback )
+bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue )
 {
-  return mImpl->AddIdle( callback, false );
+  return mImpl->AddIdle( callback, hasReturnValue, false );
 }
 
 void Adaptor::RemoveIdle( CallbackBase* callback )
@@ -89,7 +88,7 @@ void Adaptor::RemoveIdle( CallbackBase* callback )
   mImpl->RemoveIdle( callback );
 }
 
-void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface )
+void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface )
 {
   mImpl->ReplaceSurface(nativeWindow, surface);
 }
@@ -104,7 +103,7 @@ Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal()
   return mImpl->LanguageChangedSignal();
 }
 
-RenderSurface& Adaptor::GetSurface()
+Dali::RenderSurfaceInterface& Adaptor::GetSurface()
 {
   return mImpl->GetSurface();
 }
@@ -114,6 +113,11 @@ Any Adaptor::GetNativeWindowHandle()
   return mImpl->GetNativeWindowHandle();
 }
 
+Any Adaptor::GetGraphicsDisplay()
+{
+  return mImpl->GetGraphicsDisplay();
+}
+
 void Adaptor::ReleaseSurfaceLock()
 {
   mImpl->ReleaseSurfaceLock();
@@ -124,6 +128,11 @@ void Adaptor::SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender )
   mImpl->SetRenderRefreshRate( numberOfVSyncsPerRender );
 }
 
+void Adaptor::SetPreRenderCallback( CallbackBase* callback )
+{
+  mImpl->SetPreRenderCallback( callback );
+}
+
 void Adaptor::SetUseHardwareVSync(bool useHardware)
 {
   mImpl->SetUseHardwareVSync( useHardware );
@@ -174,19 +183,24 @@ void Adaptor::SceneCreated()
   mImpl->SceneCreated();
 }
 
-void Adaptor::SetViewMode( ViewMode mode )
+void Adaptor::RenderOnce()
 {
-  mImpl->SetViewMode( mode );
+  mImpl->RenderOnce();
 }
 
-void Adaptor::SetStereoBase(  float stereoBase )
+const LogFactoryInterface& Adaptor::GetLogFactory()
 {
-  mImpl->SetStereoBase( stereoBase );
+  return mImpl->GetLogFactory();
 }
 
-void Adaptor::RenderOnce()
+void Adaptor::RegisterProcessor( Integration::Processor& processor )
 {
-  mImpl->RenderOnce();
+  mImpl->RegisterProcessor( processor );
+}
+
+void Adaptor::UnregisterProcessor( Integration::Processor& processor )
+{
+  mImpl->UnregisterProcessor( processor );
 }
 
 Adaptor::Adaptor()