[Tizen]Revert "Support multiple window rendering" accepted/tizen_unified tizen accepted/tizen/unified/20190313.075457 submit/tizen/20190312.064145
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 12 Mar 2019 05:27:31 +0000 (14:27 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 12 Mar 2019 05:27:35 +0000 (14:27 +0900)
This reverts commit 33d140bdc60c0c75b562f323d33d6d474f087cb5.

Change-Id: I7193c89f321a7632803e216362eea8108e5624a8

automated-tests/src/dali-toolkit-internal/CMakeLists.txt
automated-tests/src/dali-toolkit-styling/CMakeLists.txt
automated-tests/src/dali-toolkit-third-party/CMakeLists.txt
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp [deleted file]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.h [deleted file]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-adaptor.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp

index 5e2e9ed..093f4fb 100755 (executable)
@@ -63,7 +63,6 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-render-controller.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
    dali-toolkit-test-utils/toolkit-text-utils.cpp
index bc765c7..2366711 100644 (file)
@@ -46,7 +46,6 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-gl-abstraction.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-render-controller.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
 )
index 6f50e82..a5fde09 100644 (file)
@@ -39,7 +39,6 @@ LIST(APPEND TC_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-render-controller.cpp
-   ../dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
 )
index 678a4ae..1ef55f9 100755 (executable)
@@ -118,7 +118,6 @@ LIST(APPEND TC_SOURCES
   dali-toolkit-test-utils/test-gl-sync-abstraction.cpp
   dali-toolkit-test-utils/test-platform-abstraction.cpp
   dali-toolkit-test-utils/test-render-controller.cpp
-  dali-toolkit-test-utils/test-render-surface.cpp
   dali-toolkit-test-utils/test-trace-call-stack.cpp
   dali-toolkit-test-utils/test-native-image.cpp
 )
index 1562d27..c953f50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 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.
@@ -54,6 +54,8 @@ void TestApplication::Initialize()
                                         Integration::StencilBufferAvailable::TRUE );
 
   mCore->ContextCreated();
+  mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
+  mCore->SetDpi( mDpi.x, mDpi.y );
 
   Dali::Integration::Log::LogFunction logFunction(&TestApplication::LogMessage);
   Dali::Integration::Log::InstallLogFunction(logFunction);
@@ -63,22 +65,12 @@ void TestApplication::Initialize()
 
   Dali::Integration::Trace::LogContext( true, "Test" );
 
-  mRenderSurface = new TestRenderSurface( Dali::PositionSize( 0, 0, mSurfaceWidth, mSurfaceHeight ) );
-  mScene = Dali::Integration::Scene::New( Vector2( static_cast<float>( mSurfaceWidth ), static_cast<float>( mSurfaceHeight ) ) );
-  mScene.SetSurface( *mRenderSurface );
-
-  mScene.SetDpi( Vector2( static_cast<float>( mDpi.x ), static_cast<float>( mDpi.y ) ) );
-
-  mCore->SurfaceResized( mRenderSurface );
-
   mCore->SceneCreated();
-  mCore->Initialize();
 }
 
 TestApplication::~TestApplication()
 {
   Dali::Integration::Log::UninstallLogFunction();
-  delete mRenderSurface;
   delete mCore;
 }
 
@@ -157,6 +149,19 @@ void TestApplication::SendNotification()
   mCore->ProcessEvents();
 }
 
+void TestApplication::SetSurfaceWidth( uint32_t width, uint32_t height )
+{
+  mSurfaceWidth = width;
+  mSurfaceHeight = height;
+
+  mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
+}
+
+void TestApplication::SetTopMargin( uint32_t margin )
+{
+  mCore->SetTopMargin( margin );
+}
+
 void TestApplication::DoUpdate( uint32_t intervalMilliseconds, const char* location )
 {
   if( GetUpdateStatus() == 0 &&
index fc2929c..d1e042d 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_APPLICATION_H__
 
 /*
- * Copyright (c) 2019 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.
 #include "test-gl-sync-abstraction.h"
 #include "test-gl-abstraction.h"
 #include "test-render-controller.h"
-#include "test-render-surface.h"
 #include <dali/public-api/common/dali-common.h>
 #include <dali/integration-api/resource-policies.h>
 #include <dali/integration-api/trace.h>
-#include <dali/integration-api/scene.h>
 
 namespace Dali
 {
@@ -71,6 +69,8 @@ public:
   TestGestureManager& GetGestureManager();
   void ProcessEvent(const Integration::Event& event);
   void SendNotification();
+  void SetSurfaceWidth( uint32_t width, unsigned height );
+  void SetTopMargin( uint32_t margin );
   bool Render( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location=NULL );
   uint32_t GetUpdateStatus();
   bool UpdateOnly( uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL );
@@ -83,11 +83,6 @@ public:
     mLoggingEnabled = enabled;
   }
 
-  Integration::Scene GetScene() const
-  {
-    return mScene;
-  }
-
 private:
   void DoUpdate( uint32_t intervalMilliseconds, const char* location=NULL );
 
@@ -97,13 +92,11 @@ protected:
   TestGlAbstraction         mGlAbstraction;
   TestGlSyncAbstraction     mGlSyncAbstraction;
   TestGestureManager        mGestureManager;
-  TestRenderSurface*        mRenderSurface;
 
   Integration::UpdateStatus mStatus;
   Integration::RenderStatus mRenderStatus;
 
   Integration::Core* mCore;
-  Dali::Integration::Scene mScene;
 
   uint32_t mSurfaceWidth;
   uint32_t mSurfaceHeight;
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.cpp
deleted file mode 100644 (file)
index 332d77e..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include "test-render-surface.h"
-
-namespace Dali
-{
-
-TestRenderSurface::TestRenderSurface( Dali::PositionSize positionSize )
-: mPositionSize( positionSize ),
-  mBackgroundColor()
-{
-}
-
-TestRenderSurface::~TestRenderSurface()
-{
-}
-
-Dali::PositionSize TestRenderSurface::GetPositionSize() const
-{
-  return mPositionSize;
-};
-
-void TestRenderSurface::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
-{
-  dpiHorizontal = dpiVertical = 96;
-};
-
-void TestRenderSurface::InitializeGraphics()
-{
-}
-
-void TestRenderSurface::CreateSurface()
-{
-}
-
-void TestRenderSurface::DestroySurface()
-{
-}
-
-bool TestRenderSurface::ReplaceGraphicsSurface()
-{
-  return false;
-}
-
-void TestRenderSurface::MoveResize( Dali::PositionSize positionSize )
-{
-  mPositionSize = positionSize;
-}
-
-void TestRenderSurface::StartRender()
-{
-}
-
-bool TestRenderSurface::PreRender( bool resizingSurface )
-{
-  return true;
-}
-
-void TestRenderSurface::PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface )
-{
-}
-
-void TestRenderSurface::StopRender()
-{
-}
-
-void TestRenderSurface::ReleaseLock()
-{
-}
-
-Dali::Integration::RenderSurface::Type TestRenderSurface::GetSurfaceType()
-{
-  return WINDOW_RENDER_SURFACE;
-}
-
-void TestRenderSurface::MakeContextCurrent()
-{
-}
-
-Integration::DepthBufferAvailable TestRenderSurface::GetDepthBufferRequired()
-{
-  return Integration::DepthBufferAvailable::TRUE;
-}
-
-Integration::StencilBufferAvailable TestRenderSurface::GetStencilBufferRequired()
-{
-  return Integration::StencilBufferAvailable::TRUE;
-}
-
-void TestRenderSurface::SetBackgroundColor( Vector4 color )
-{
-  mBackgroundColor = color;
-}
-
-Vector4 TestRenderSurface::GetBackgroundColor()
-{
-  return mBackgroundColor;
-}
-
-} // Namespace dali
diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.h
deleted file mode 100644 (file)
index fba89c2..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-#ifndef TEST_REENDER_SURFACE_H
-#define TEST_REENDER_SURFACE_H
-
-/*
- * 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-#include <dali/integration-api/render-surface.h>
-
-namespace Dali
-{
-
-/**
- * Concrete implementation of the RenderSurface class.
- */
-class DALI_CORE_API TestRenderSurface : public Dali::Integration::RenderSurface
-{
-public:
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::RenderSurface
-   */
-  TestRenderSurface( Dali::PositionSize positionSize );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::~RenderSurface
-   */
-  virtual ~TestRenderSurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetPositionSize
-   */
-  virtual Dali::PositionSize GetPositionSize() const;
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDpi
-   */
-  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
-   */
-  virtual void InitializeGraphics();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::CreateSurface
-   */
-  virtual void CreateSurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::DestroySurface
-   */
-  virtual void DestroySurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
-   */
-  virtual bool ReplaceGraphicsSurface();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MoveResize
-   */
-  virtual void MoveResize( Dali::PositionSize positionSize );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::StartRender
-   */
-  virtual void StartRender();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::PreRender
-   */
-  virtual bool PreRender( bool resizingSurface );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::PostRender
-   */
-  virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::StopRender
-   */
-  virtual void StopRender();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::ReleaseLock
-   */
-  virtual void ReleaseLock();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
-   */
-  virtual Dali::Integration::RenderSurface::Type GetSurfaceType();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
-   */
-  virtual void MakeContextCurrent();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
-   */
-  virtual Integration::DepthBufferAvailable GetDepthBufferRequired();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
-   */
-  virtual Integration::StencilBufferAvailable GetStencilBufferRequired();
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::SetBackgroundColor
-   */
-  virtual void SetBackgroundColor( Vector4 color );
-
-  /**
-   * @copydoc Dali::Integration::RenderSurface::GetBackgroundColor
-   */
-  virtual Vector4 GetBackgroundColor();
-
-private:
-
-  /**
-   * @brief Undefined copy constructor. RenderSurface cannot be copied
-   */
-  TestRenderSurface( const TestRenderSurface& rhs );
-
-  /**
-   * @brief Undefined assignment operator. RenderSurface cannot be copied
-   */
-  TestRenderSurface& operator=( const TestRenderSurface& rhs );
-
-private:
-
-  Dali::PositionSize mPositionSize;
-  Vector4 mBackgroundColor;                                     ///< The background color of the surface
-};
-
-} // Dali
-
-#endif
index 902167c..ee60af1 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 
-#include <dali/integration-api/adaptors/render-surface-interface.h>
+#include <dali/integration-api/adaptors/render-surface.h>
 
 namespace Dali
 {
@@ -45,6 +45,40 @@ class GlAbstraction;
 
 } // namespace Integration
 
+class TestRenderSurface : public RenderSurface
+{
+public:
+  virtual PositionSize GetPositionSize() const { PositionSize size; return size; }
+
+  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) { dpiHorizontal = dpiVertical = 96; }
+
+  virtual void InitializeGraphics( Dali::Internal::Adaptor::GraphicsInterface& graphics, Dali::DisplayConnection& displayConnection ) {};
+
+  virtual void CreateSurface() {}
+
+  virtual void DestroySurface() {}
+
+  virtual bool ReplaceGraphicsSurface() { return false; }
+
+  virtual void MoveResize( Dali::PositionSize positionSize ) {}
+
+  virtual void SetViewMode( ViewMode viewMode ) {}
+
+  virtual void StartRender() {}
+
+  virtual bool PreRender( bool resizingSurface ) { return false; }
+
+  virtual void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface ) {}
+
+  virtual void StopRender() {}
+
+  virtual void ReleaseLock() {}
+
+  virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) {}
+
+  virtual RenderSurface::Type GetSurfaceType() { return RenderSurface::WINDOW_RENDER_SURFACE; }
+};
+
 namespace Internal
 {
 namespace Adaptor
@@ -58,7 +92,7 @@ public:
   ~Adaptor();
 
 public:
-  static Dali::RenderSurfaceInterface& GetSurface();
+  static Dali::RenderSurface& GetSurface();
   static Dali::Adaptor::AdaptorSignalType& AdaptorSignal();
   static bool mAvailable;
   static Vector<CallbackBase*> mCallbacks;
index 5d6cf4e..dcf0560 100644 (file)
@@ -23,7 +23,6 @@
 #include <toolkit-adaptor-impl.h>
 #include <dali/integration-api/debug.h>
 #include <test-application.h>
-#include <test-render-surface.h>
 
 namespace Dali
 {
@@ -43,9 +42,9 @@ Dali::Adaptor& Adaptor::Get()
   return *adaptor;
 }
 
-Dali::RenderSurfaceInterface& Adaptor::GetSurface()
+Dali::RenderSurface& Adaptor::GetSurface()
 {
-  Dali::RenderSurfaceInterface* renderSurface = reinterpret_cast <Dali::RenderSurfaceInterface*>( new Dali::TestRenderSurface( Dali::PositionSize( 0, 0, 480, 800 ) ) );
+  Dali::RenderSurface *renderSurface = new Dali::TestRenderSurface;
   return *renderSurface;
 }
 
@@ -68,12 +67,12 @@ Adaptor& Adaptor::New( Window window, Configuration::ContextLoss configuration )
   return Internal::Adaptor::Adaptor::Get();
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface )
 {
   return Internal::Adaptor::Adaptor::Get();
 }
 
-Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurfaceInterface& surface, Configuration::ContextLoss configuration )
+Adaptor& Adaptor::New( Any nativeWindow, const Dali::RenderSurface& surface, Configuration::ContextLoss configuration )
 {
   return Internal::Adaptor::Adaptor::Get();
 }
@@ -130,7 +129,7 @@ void Adaptor::RemoveIdle( CallbackBase* callback )
   }
 }
 
-void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurfaceInterface& surface )
+void Adaptor::ReplaceSurface( Any nativeWindow, Dali::RenderSurface& surface )
 {
 }
 
@@ -144,7 +143,7 @@ Adaptor::AdaptorSignalType& Adaptor::LanguageChangedSignal()
   return Internal::Adaptor::Adaptor::AdaptorSignal();
 }
 
-Dali::RenderSurfaceInterface& Adaptor::GetSurface()
+RenderSurface& Adaptor::GetSurface()
 {
   return Internal::Adaptor::Adaptor::GetSurface();
 }
index 438a496..a527eac 100644 (file)
@@ -217,7 +217,6 @@ void CleanupTest()
 
 int UtcDaliScrollViewPagePathEffectSetup(void)
 {
-  ToolkitTestApplication application;
   tet_infoline(" UtcDaliScrollViewPagePathEffectSetup");
 
   ScrollViewPagePathEffect effect;