PositionSize API at dali-toolkit-test-utils/toolkit-window.cpp
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-scene-holder-impl.h
index 86b3bd9..fb67a4b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SCENE_HOLDER_IMPL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
@@ -31,9 +31,9 @@ class TestRenderSurface : public Dali::RenderSurfaceInterface
 {
 public:
 
-  TestRenderSurface( PositionSize positionSize ) {};
+  TestRenderSurface( PositionSize positionSize ) : mPositionSize(positionSize) {};
 
-  PositionSize GetPositionSize() const override { PositionSize size; return size; };
+  PositionSize GetPositionSize() const override { return mPositionSize; };
 
   virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) { dpiHorizontal = dpiVertical = 96; }
 
@@ -45,13 +45,17 @@ public:
 
   bool ReplaceGraphicsSurface() override { return false; };
 
-  void MoveResize( Dali::PositionSize positionSize ) override {};
+  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( bool renderToFbo, bool replacingSurface, bool resizingSurface, const std::vector<Rect<int>>& damagedRects ) override {};
+  void PostRender()
+  {
+  }
+
+  //void PostRender( bool renderToFbo, bool replacingSurface, bool resizingSurface, const std::vector<Rect<int>>& damagedRects ) override {};
 
   void StopRender() override {};
 
@@ -72,6 +76,9 @@ public:
   void SetBackgroundColor( Vector4 color ) {};
 
   Vector4 GetBackgroundColor() { return Color::WHITE; };
+
+private:
+  PositionSize mPositionSize;
 };
 
 namespace Internal
@@ -116,7 +123,7 @@ public:
 
   Dali::RenderSurfaceInterface& GetRenderSurface();
 
-private:
+protected:
 
   TestRenderSurface mRenderSurface;
   Integration::Scene mScene;