Syncing automated tests 87/313487/4
authorDavid Steele <david.steele@samsung.com>
Fri, 21 Jun 2024 08:28:36 +0000 (09:28 +0100)
committerDavid Steele <david.steele@samsung.com>
Mon, 8 Jul 2024 09:47:33 +0000 (10:47 +0100)
Change-Id: I1c87e5c49cb337ca039e95796e56dd115e5dbe5a

18 files changed:
automated-tests/src/dali-physics2d/CMakeLists.txt
automated-tests/src/dali-physics3d/CMakeLists.txt
automated-tests/src/dali-scene3d-internal/CMakeLists.txt
automated-tests/src/dali-scene3d/CMakeLists.txt
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 [new file with mode: 0644]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-render-surface.h [new file with mode: 0644]
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/dali-toolkit-test-utils/toolkit-scene-holder-impl.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-scene-holder.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-window.h

index e72db0842a9741a98b54d31032401623b29ecd46..b1fd2e9bfbc9dd7454d309fe4934dbdaa8c5803f 100644 (file)
@@ -55,6 +55,7 @@ SET(TEST_HARNESS_SOURCES
   ${TEST_HARNESS_DIR}/test-graphics-reflection.cpp
   ${TEST_HARNESS_DIR}/test-platform-abstraction.cpp
   ${TEST_HARNESS_DIR}/test-render-controller.cpp
+  ${TEST_HARNESS_DIR}/test-render-surface.cpp
   ${TEST_HARNESS_DIR}/test-trace-call-stack.cpp
 )
 
index 01ecfc01b54810aca38051a9d57a2890ef0f85a5..3b7a46964ddb74d1638bbc31bc8f70380ca63698 100644 (file)
@@ -54,6 +54,7 @@ SET(TEST_HARNESS_SOURCES
   ${TEST_HARNESS_DIR}/test-graphics-reflection.cpp
   ${TEST_HARNESS_DIR}/test-platform-abstraction.cpp
   ${TEST_HARNESS_DIR}/test-render-controller.cpp
+  ${TEST_HARNESS_DIR}/test-render-surface.cpp
   ${TEST_HARNESS_DIR}/test-trace-call-stack.cpp
 )
 
index b0503149fe21fdbcfff6b907a36a7057741eb18d..8385cb9021316d4e1b938531dc98f8aeba8da298 100755 (executable)
@@ -64,6 +64,7 @@ SET(TEST_HARNESS_SOURCES
   ${TEST_HARNESS_DIR}/test-graphics-reflection.cpp
   ${TEST_HARNESS_DIR}/test-platform-abstraction.cpp
   ${TEST_HARNESS_DIR}/test-render-controller.cpp
+  ${TEST_HARNESS_DIR}/test-render-surface.cpp
   ${TEST_HARNESS_DIR}/test-trace-call-stack.cpp
 )
 
index 1269cb24a9994577fd57060146f24c89eeec00ff..32d829d3662eb70cc2c752e2b98ed34de5fe8d05 100755 (executable)
@@ -88,6 +88,7 @@ SET(TEST_HARNESS_SOURCES
   ${TEST_HARNESS_DIR}/test-graphics-reflection.cpp
   ${TEST_HARNESS_DIR}/test-platform-abstraction.cpp
   ${TEST_HARNESS_DIR}/test-render-controller.cpp
+  ${TEST_HARNESS_DIR}/test-render-surface.cpp
   ${TEST_HARNESS_DIR}/test-trace-call-stack.cpp
 )
 
index 05354c0d7bc2ac89940587e7f7b46d6514a3da46..68bbf2f35f36314e1637f37a81c4685055227aeb 100755 (executable)
@@ -105,6 +105,7 @@ SET(TEST_HARNESS_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-graphics-shader.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 dcce7cd9762183b0d0d9fd5c33e12795f4f2a45b..f27d5cd7cdf2cdfb4486a302d4c8ef749cdd9a42 100644 (file)
@@ -58,6 +58,7 @@ SET(TEST_HARNESS_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-graphics-shader.cpp
    ../dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.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 9633069948415a8dad868c32b7c99fcb54ce9b9e..61547b2d47d2a49877aa5852288da5e486153f92 100644 (file)
@@ -45,6 +45,7 @@ SET(TEST_HARNESS_SOURCES
    ../dali-toolkit/dali-toolkit-test-utils/test-graphics-reflection.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 75f2eb69c0a1fff285d157c412e9c59c13a09691..683a01bb80cd2ab84c945a4d5dfc74126972b38f 100755 (executable)
@@ -151,6 +151,7 @@ SET(TEST_HARNESS_SOURCES
   dali-toolkit-test-utils/test-graphics-shader.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
   test-text-geometry-utils.cpp
index 71bc0517f8c3bc864212fc48b09b0c1dc3e9b83a..145a14a54ccf99372971a054032362c898ca43bb 100644 (file)
@@ -83,10 +83,10 @@ void TestApplication::CreateScene()
   mScene.SetDpi(Vector2(static_cast<float>(mDpi.x), static_cast<float>(mDpi.y)));
 
   // Create render target for the scene
+  mRenderSurface = new TestRenderSurface(Dali::PositionSize(0, 0, mSurfaceWidth, mSurfaceHeight));
   Graphics::RenderTargetCreateInfo rtInfo{};
   rtInfo.SetExtent({mSurfaceWidth, mSurfaceHeight});
-  rtInfo.SetSurface(&mSurfaceWidth); // Can point to anything, really.
-
+  rtInfo.SetSurface(mRenderSurface);
   mScene.SetSurfaceRenderTarget(rtInfo);
 
   mScenes.push_back(mScene);
index 555822d6a22a850e3f8559cfb37008193e6575a1..6876dc8c28c9d4bc159c6ca09ef21f1faa5588e1 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "test-graphics-controller.h"
 #include "test-render-controller.h"
+#include "test-render-surface.h"
 
 namespace Dali
 {
@@ -102,6 +103,7 @@ protected:
   TestPlatformAbstraction mPlatformAbstraction;
   TestRenderController    mRenderController;
   TestGraphicsController  mGraphicsController;
+  TestRenderSurface*      mRenderSurface;
 
   Integration::UpdateStatus mStatus;
   Integration::RenderStatus mRenderStatus;
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
new file mode 100644 (file)
index 0000000..60a0ad0
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2024 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;
+};
+
+int TestRenderSurface::GetSurfaceOrientation() const
+{
+  return 0;
+}
+
+int TestRenderSurface::GetScreenOrientation() const
+{
+  return 0;
+}
+
+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, const std::vector<Rect<int>>& damageRects, Rect<int>& clippingRect)
+{
+  return true;
+}
+
+void TestRenderSurface::PostRender()
+{
+}
+
+void TestRenderSurface::StopRender()
+{
+}
+
+void TestRenderSurface::ReleaseLock()
+{
+}
+
+void TestRenderSurface::SetThreadSynchronization(ThreadSynchronizationInterface& threadSynchronization)
+{
+}
+
+Dali::Integration::RenderSurfaceInterface::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;
+}
+
+} // 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
new file mode 100644 (file)
index 0000000..f310f4f
--- /dev/null
@@ -0,0 +1,153 @@
+#ifndef TEST_RENDER_SURFACE_H
+#define TEST_RENDER_SURFACE_H
+
+/*
+ * Copyright (c) 2024 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/integration-api/adaptor-framework/render-surface-interface.h>
+#include <dali/public-api/common/dali-common.h>
+
+namespace Dali
+{
+/**
+ * Concrete implementation of the RenderSurface class.
+ */
+class TestRenderSurface : public Dali::Integration::RenderSurfaceInterface
+{
+public:
+  /**
+   * @copydoc Dali::Integration::RenderSurface::RenderSurface
+   */
+  TestRenderSurface(Dali::PositionSize positionSize);
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::~RenderSurface
+   */
+  ~TestRenderSurface() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetPositionSize
+   */
+  Dali::PositionSize GetPositionSize() const override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetDpi
+   */
+  void GetDpi(unsigned int& dpiHorizontal, unsigned int& dpiVertical) override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetSurfaceOrientation
+   */
+  int GetSurfaceOrientation() const override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetScreenOrientation
+   */
+  int GetScreenOrientation() const override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::InitializeGraphics
+   */
+  void InitializeGraphics() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::CreateSurface
+   */
+  void CreateSurface() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::DestroySurface
+   */
+  void DestroySurface() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::ReplaceGraphicsSurface
+   */
+  bool ReplaceGraphicsSurface() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::MoveResize
+   */
+  void MoveResize(Dali::PositionSize positionSize) override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::StartRender
+   */
+  void StartRender() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::PreRender
+   */
+  bool PreRender(bool resizingSurface, const std::vector<Rect<int>>& damageRects, Rect<int>& clippingRect) override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::PostRender
+   */
+  void PostRender() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::StopRender
+   */
+  void StopRender() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::ReleaseLock
+   */
+  void ReleaseLock() override;
+
+  void SetThreadSynchronization(ThreadSynchronizationInterface& threadSynchronization) override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetSurfaceType
+   */
+  Dali::Integration::RenderSurfaceInterface::Type GetSurfaceType() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::MakeContextCurrent
+   */
+  void MakeContextCurrent() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetDepthBufferRequired
+   */
+  Integration::DepthBufferAvailable GetDepthBufferRequired() override;
+
+  /**
+   * @copydoc Dali::Integration::RenderSurface::GetStencilBufferRequired
+   */
+  Integration::StencilBufferAvailable GetStencilBufferRequired() override;
+
+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
+};
+
+} // namespace Dali
+
+#endif // TEST_RENDER_SURFACE_H
index 07e8ffdb3fec5589a7527f2d31fbc57c8cc470fa..f4a61f82b3ac8cedee0bfadeeb4f6c3c8e89b313 100644 (file)
@@ -75,9 +75,9 @@ public:
 
   static Integration::Scene GetScene(Dali::Window window);
 
-  Dali::RenderSurfaceInterface& GetSurface();
-  Dali::WindowContainer         GetWindows();
-  Dali::SceneHolderList         GetSceneHolders();
+  Dali::Integration::RenderSurfaceInterface& GetSurface();
+  Dali::WindowContainer                      GetWindows();
+  Dali::SceneHolderList                      GetSceneHolders();
 
   Dali::Internal::Adaptor::SceneHolder* GetWindow(Dali::Actor& actor);
   void                                  AddWindow(Internal::Adaptor::SceneHolder* window);
index 3c9445aa80baa52425cdb80055cfb39fc2699f59..488d2d6d43eef2ae793b6e4727c25d077473ea86 100644 (file)
@@ -114,8 +114,12 @@ bool Adaptor::AddIdle(CallbackBase* callback, bool hasReturnValue)
 
 void Adaptor::RemoveIdle(CallbackBase* callback)
 {
-  mCallbacks.Erase(std::remove_if(mCallbacks.Begin(), mCallbacks.End(), [&callback](CallbackBase* current) { return callback == current; }), mCallbacks.End());
-  mReturnCallbacks.Erase(std::remove_if(mReturnCallbacks.Begin(), mReturnCallbacks.End(), [&callback](CallbackBase* current) { return callback == current; }), mReturnCallbacks.End());
+  mCallbacks.Erase(std::remove_if(mCallbacks.Begin(), mCallbacks.End(), [&callback](CallbackBase* current)
+                                  { return callback == current; }),
+                   mCallbacks.End());
+  mReturnCallbacks.Erase(std::remove_if(mReturnCallbacks.Begin(), mReturnCallbacks.End(), [&callback](CallbackBase* current)
+                                        { return callback == current; }),
+                         mReturnCallbacks.End());
 }
 
 void Adaptor::RunIdles()
@@ -152,11 +156,11 @@ void Adaptor::RequestUpdateOnce()
   }
 }
 
-Dali::RenderSurfaceInterface& Adaptor::GetSurface()
+Dali::Integration::RenderSurfaceInterface& Adaptor::GetSurface()
 {
   DALI_ASSERT_ALWAYS(!mWindows.empty());
 
-  return reinterpret_cast<Dali::RenderSurfaceInterface&>(mWindows.front()->GetRenderSurface());
+  return reinterpret_cast<Dali::Integration::RenderSurfaceInterface&>(mWindows.front()->GetRenderSurface());
 }
 
 Dali::WindowContainer Adaptor::GetWindows()
@@ -318,11 +322,11 @@ void Adaptor::RemoveIdle(CallbackBase* callback)
   mImpl->RemoveIdle(callback);
 }
 
-void Adaptor::ReplaceSurface(Window window, Dali::RenderSurfaceInterface& surface)
+void Adaptor::ReplaceSurface(Window window, Dali::Integration::RenderSurfaceInterface& surface)
 {
 }
 
-void Adaptor::ReplaceSurface(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& surface)
+void Adaptor::ReplaceSurface(Dali::Integration::SceneHolder window, Dali::Integration::RenderSurfaceInterface& surface)
 {
 }
 
@@ -341,7 +345,7 @@ Adaptor::WindowCreatedSignalType& Adaptor::WindowCreatedSignal()
   return mImpl->WindowCreatedSignal();
 }
 
-Dali::RenderSurfaceInterface& Adaptor::GetSurface()
+Dali::Integration::RenderSurfaceInterface& Adaptor::GetSurface()
 {
   return mImpl->GetSurface();
 }
index 42050e4e3c0b953c51ba3d4a873adc072428500d..aa521d7f41ba3b8cf9fb77f75465d0e5aa19fc45 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SCENE_HOLDER_IMPL_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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/integration-api/adaptor-framework/render-surface-interface.h>
-
 #include <dali/integration-api/scene.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/object/base-object.h>
+#include "test-render-surface.h"
 
 namespace Dali
 {
 
-class TestRenderSurface : public Dali::RenderSurfaceInterface
-{
-public:
-
-  TestRenderSurface( PositionSize positionSize ) : mPositionSize(positionSize) {};
-
-  PositionSize GetPositionSize() const override { return mPositionSize; };
-
-  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) { dpiHorizontal = dpiVertical = 96; }
-
-  void InitializeGraphics() override {};
-
-  void CreateSurface() override {};
-
-  void DestroySurface() override {};
-
-  bool ReplaceGraphicsSurface() override { return false; };
-
-  void MoveResize( Dali::PositionSize positionSize ) override { mPositionSize = positionSize; };
-
-  void StartRender() override {};
-
-  bool PreRender( bool resizingSurface, const std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect  ) override { return false; };
-
-  void PostRender()
-  {
-  }
-
-  //void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface, const std::vector<Rect<int>>& damagedRects ) override {};
-
-  void StopRender() override {};
-
-  void ReleaseLock() override {};
-
-  void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override {};
-
-  RenderSurfaceInterface::Type GetSurfaceType() override { return RenderSurfaceInterface::WINDOW_RENDER_SURFACE; };
-
-  void MakeContextCurrent() override {};
-
-  Integration::DepthBufferAvailable GetDepthBufferRequired() override { return Integration::DepthBufferAvailable::FALSE; };
-
-  Integration::StencilBufferAvailable GetStencilBufferRequired() override { return Integration::StencilBufferAvailable::FALSE; };
-
-  int GetSurfaceOrientation() const override {return 0;};
-
-  int GetScreenOrientation() const override {return 0;};
-
-  void SetBackgroundColor( Vector4 color ) {};
-
-  Vector4 GetBackgroundColor() { return Color::WHITE; };
-
-private:
-  PositionSize mPositionSize;
-};
-
 namespace Internal
 {
 
@@ -92,26 +35,25 @@ namespace Adaptor
 class SceneHolder : public Dali::BaseObject
 {
 public:
-
-  SceneHolder( const Dali::Rect<int>& positionSize );
+  SceneHolder(const Dali::Rect<int>& positionSize);
 
   virtual ~SceneHolder();
 
-  void Add( Dali::Actor actor );
+  void Add(Dali::Actor actor);
 
-  void Remove( Dali::Actor actor );
+  void Remove(Dali::Actor actor);
 
   Dali::Layer GetRootLayer() const;
 
-  void SetBackgroundColor( Vector4 color );
+  void SetBackgroundColor(Vector4 color);
 
   Vector4 GetBackgroundColor() const;
 
-  void FeedTouchPoint( Dali::TouchPoint& point, int timeStamp );
+  void FeedTouchPoint(Dali::TouchPoint& point, int timeStamp);
 
-  void FeedWheelEvent( Dali::WheelEvent& wheelEvent );
+  void FeedWheelEvent(Dali::WheelEvent& wheelEvent);
 
-  void FeedKeyEvent( Dali::KeyEvent& keyEvent );
+  void FeedKeyEvent(Dali::KeyEvent& keyEvent);
 
   Dali::Integration::SceneHolder::KeyEventSignalType& KeyEventSignal();
 
@@ -125,13 +67,12 @@ public:
 
   Integration::Scene GetScene();
 
-  Dali::RenderSurfaceInterface& GetRenderSurface();
+  Dali::Integration::RenderSurfaceInterface& GetRenderSurface();
 
   Dali::RenderTaskList GetRenderTaskList();
 
 protected:
-
-  TestRenderSurface mRenderSurface;
+  TestRenderSurface* mRenderSurface;
   Integration::Scene mScene;
 };
 
@@ -139,18 +80,18 @@ protected:
 
 } // namespace Internal
 
-inline Internal::Adaptor::SceneHolder& GetImplementation( Dali::Integration::SceneHolder& sceneHolder )
+inline Internal::Adaptor::SceneHolder& GetImplementation(Dali::Integration::SceneHolder& sceneHolder)
 {
-  DALI_ASSERT_ALWAYS( sceneHolder && "SceneHolder handle is empty" );
+  DALI_ASSERT_ALWAYS(sceneHolder && "SceneHolder handle is empty");
   BaseObject& object = sceneHolder.GetBaseObject();
-  return static_cast<Internal::Adaptor::SceneHolder&>( object );
+  return static_cast<Internal::Adaptor::SceneHolder&>(object);
 }
 
-inline const Internal::Adaptor::SceneHolder& GetImplementation( const Dali::Integration::SceneHolder& sceneHolder )
+inline const Internal::Adaptor::SceneHolder& GetImplementation(const Dali::Integration::SceneHolder& sceneHolder)
 {
-  DALI_ASSERT_ALWAYS( sceneHolder && "SceneHolder handle is empty" );
+  DALI_ASSERT_ALWAYS(sceneHolder && "SceneHolder handle is empty");
   const BaseObject& object = sceneHolder.GetBaseObject();
-  return static_cast<const Internal::Adaptor::SceneHolder&>( object );
+  return static_cast<const Internal::Adaptor::SceneHolder&>(object);
 }
 
 } // namespace Dali
index 22a027be74d1f49805562308344ee059f593debd..fad4fc439089863ed6baa15793fac95e06b8e1ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
@@ -27,6 +27,7 @@
 #include <dali/integration-api/adaptor-framework/adaptor.h>
 #include <dali/public-api/render-tasks/render-task-list.h>
 #include <toolkit-adaptor-impl.h>
+#include "test-render-surface.h"
 
 using AdaptorImpl = Dali::Internal::Adaptor::Adaptor;
 
@@ -43,7 +44,7 @@ namespace Internal
 namespace Adaptor
 {
 SceneHolder::SceneHolder(const Dali::Rect<int>& positionSize)
-: mRenderSurface(positionSize),
+: mRenderSurface(new TestRenderSurface(positionSize)),
   mScene(Dali::Integration::Scene::New(Dali::Size(static_cast<float>(positionSize.width), static_cast<float>(positionSize.height))))
 {
 }
@@ -123,9 +124,9 @@ Integration::Scene SceneHolder::GetScene()
   return mScene;
 }
 
-Dali::RenderSurfaceInterface& SceneHolder::GetRenderSurface()
+Dali::Integration::RenderSurfaceInterface& SceneHolder::GetRenderSurface()
 {
-  return mRenderSurface;
+  return *mRenderSurface;
 }
 
 Dali::RenderTaskList SceneHolder::GetRenderTaskList()
index b770e14ccfc737b77941f997c94d6f1ca2be98ed..24d27838420950a762e392491a77f6d9248d119f 100644 (file)
@@ -59,26 +59,26 @@ Window* Window::New(const PositionSize& positionSize, const std::string& name, c
 
 Dali::Window::WindowPosition Window::GetPosition() const
 {
-  PositionSize positionSize = mRenderSurface.GetPositionSize();
+  PositionSize positionSize = mRenderSurface->GetPositionSize();
 
   return Dali::Window::WindowPosition(positionSize.x, positionSize.y);
 }
 
 PositionSize Window::GetPositionSize() const
 {
-  return mRenderSurface.GetPositionSize();
+  return mRenderSurface->GetPositionSize();
 }
 
 Dali::Window::WindowSize Window::GetSize() const
 {
-  PositionSize positionSize = mRenderSurface.GetPositionSize();
+  PositionSize positionSize = mRenderSurface->GetPositionSize();
 
   return Dali::Window::WindowSize(positionSize.width, positionSize.height);
 }
 
 void Window::SetPositionSize(PositionSize positionSize)
 {
-  mRenderSurface.MoveResize(positionSize);
+  mRenderSurface->MoveResize(positionSize);
 
   Uint16Pair   newSize(positionSize.width, positionSize.height);
   Dali::Window handle(this);
@@ -155,7 +155,7 @@ Integration::Scene Window::GetScene()
   return GetImplementation(*this).GetScene();
 }
 
-Dali::RenderSurfaceInterface& Window::GetRenderSurface()
+Dali::Integration::RenderSurfaceInterface& Window::GetRenderSurface()
 {
   return GetImplementation(*this).GetRenderSurface();
 }
index 2c3eb285d7f6f36cfbc45cf0f72f49c821d1ae92..d4901f8f221f968502aa8ac27e00e9fb39f0f9b3 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 
-//EXTERNAL INCLUDES
+// EXTERNAL INCLUDES
 #include <dali/integration-api/scene.h>
 #include <dali/public-api/math/int-pair.h>
 #include <dali/public-api/math/rect.h>
@@ -71,22 +71,22 @@ public:
   Window&       operator=(Window&& rhs);
   static Window DownCast(BaseHandle handle);
 
-  Integration::Scene            GetScene();
-  Dali::RenderSurfaceInterface& GetRenderSurface();
-  void                          Add(Dali::Actor actor);
-  void                          Remove(Dali::Actor actor);
-  Dali::Layer                   GetRootLayer() const;
-  void                          SetBackgroundColor(const Vector4& color);
-  Vector4                       GetBackgroundColor() const;
-  void                          Raise();
-  void                          Show();
-  void                          Hide();
-  bool                          IsVisible() const;
-  FocusChangeSignalType&        FocusChangeSignal();
-  KeyEventSignalType&           KeyEventSignal();
-  TouchEventSignalType&         TouchedSignal();
-  ResizeSignalType&             ResizeSignal();
-  Dali::RenderTaskList          GetRenderTaskList();
+  Integration::Scene                         GetScene();
+  Dali::Integration::RenderSurfaceInterface& GetRenderSurface();
+  void                                       Add(Dali::Actor actor);
+  void                                       Remove(Dali::Actor actor);
+  Dali::Layer                                GetRootLayer() const;
+  void                                       SetBackgroundColor(const Vector4& color);
+  Vector4                                    GetBackgroundColor() const;
+  void                                       Raise();
+  void                                       Show();
+  void                                       Hide();
+  bool                                       IsVisible() const;
+  FocusChangeSignalType&                     FocusChangeSignal();
+  KeyEventSignalType&                        KeyEventSignal();
+  TouchEventSignalType&                      TouchedSignal();
+  ResizeSignalType&                          ResizeSignal();
+  Dali::RenderTaskList                       GetRenderTaskList();
 
 public:
   explicit Window(Internal::Adaptor::Window* window);