Remove Setter/Getter public APIs from Dali::Layer 79/235879/1
authorRichard Huang <r.huang@samsung.com>
Wed, 10 Jun 2020 13:02:25 +0000 (14:02 +0100)
committerRichard Huang <r.huang@samsung.com>
Wed, 10 Jun 2020 13:02:37 +0000 (14:02 +0100)
Change-Id: I1cfd50e01511c219929538c1d517d71d50584998

13 files changed:
examples/benchmark/benchmark.cpp
examples/clipping/clipping-example.cpp
examples/cube-transition-effect/cube-transition-effect-example.cpp
examples/deferred-shading/deferred-shading.cpp
examples/flex-container/flex-container-example.cpp
examples/fpp-game/fpp-game-example.cpp
examples/item-view/item-view-example.cpp
examples/perf-scroll/perf-scroll.cpp
examples/pre-render-callback/pre-render-callback-example.cpp
examples/primitive-shapes/primitive-shapes-example.cpp
examples/reflection-demo/reflection-example.cpp
examples/renderer-stencil/renderer-stencil-example.cpp
examples/shadows-and-lights/shadows-and-lights-example.cpp

index c4d4cf2cdd6d308d3889331bcff42b4fbb98c87b..a07e5f950aee9a1d79a63f9a032869ffae824759 100644 (file)
@@ -237,7 +237,7 @@ public:
     stage.SetBackgroundColor( Color::WHITE );
     Vector2 stageSize = stage.GetSize();
 
-    stage.GetRootLayer().SetDepthTestDisabled(true);
+    stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false );
 
     mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f );
 
index 408d5c535c5afdaf1c8c8895003d9759c0f7fd59..ab43a075cbb1dc5eb8ed17b711b4518751a3a4b4 100644 (file)
@@ -99,7 +99,7 @@ private:
 
     // Create a Spiral Layout and add it to the Item View.
     mItemView.AddLayout( * DefaultItemLayout::New( DefaultItemLayout::SPIRAL ) );
-    stage.GetRootLayer().SetBehavior( Layer::LAYER_3D ); // The item-view spiral layout requires Layer 3D behaviour.
+    stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D ); // The item-view spiral layout requires Layer 3D behaviour.
 
     // Calculate the size we would like our item-view layout to be, and then activate the layout.
     const Vector2 stageSize = stage.GetSize();
index fd4ce0ae10f4bcfb7a0d2a5f57b0ad0338a8924d..ba73d76e8821aaef79d12772739facfbefa3da0e 100644 (file)
@@ -214,7 +214,7 @@ void CubeTransitionApp::OnInit( Application& application )
 
   // Creates a default view with a default tool bar, the view is added to the stage.
   mContent = DemoHelper::CreateView( application, mView, mToolBar, "", TOOLBAR_IMAGE, "" );
-  mContent.SetBehavior( Layer::LAYER_3D );
+  mContent.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
 
   // Add an effect changing toggle button
index b3819e79c3b6701bf0f672771f41b82b9d6bb724..78aff54b8b88460edbc5c7b75d6efced6d6b5d9e 100644 (file)
@@ -504,7 +504,7 @@ private:
     // Grab stage, configure layer
     Stage stage = Stage::GetCurrent();
     auto rootLayer = stage.GetRootLayer();
-    rootLayer.SetBehavior(Layer::LAYER_3D);
+    rootLayer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
     auto stageSize = stage.GetSize();
     auto stageHalfSize = stageSize * .5f;
index 0d5acb4bcd597808409ba330ca7ebacb73437d09..b488674175dce66f78508bd55e1d7f3ac458b9bf 100644 (file)
@@ -121,7 +121,7 @@ public:
   {
     Stage stage = Dali::Stage::GetCurrent();
     stage.KeyEventSignal().Connect(this, &FlexContainerExample::OnKeyEvent);
-    stage.GetRootLayer().SetBehavior(Layer::LAYER_3D);
+    stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR,Layer::LAYER_3D );
 
     Vector2 stageSize = Stage::GetCurrent().GetSize();
 
index c409dc28471a2d9c2e9413aebdb98bdaed9663a9..517cf69fc7427470c2b6e9e152baf33501db6418 100644 (file)
@@ -103,7 +103,7 @@ public:
     mStage.SetBackgroundColor( Color::BLACK );
 
     // Use 3D layer
-    mStage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
+    mStage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
     // Load game scene
     mScene.Load( SCENE_URL );
index 677232dc72a3442b14ad5d6791a66711bd28e518..55e2c5b68adc4a66af8bc994b8c2164cbb738858 100644 (file)
@@ -198,7 +198,7 @@ public:
   {
     Stage stage = Dali::Stage::GetCurrent();
     stage.KeyEventSignal().Connect(this, &ItemViewExample::OnKeyEvent);
-    stage.GetRootLayer().SetBehavior(Layer::LAYER_3D);
+    stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
     Vector2 stageSize = Stage::GetCurrent().GetSize();
 
@@ -280,7 +280,7 @@ public:
 
     // Display item view on the stage
     stage.Add( mItemView );
-    stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
+    stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
 
     // Create the layouts
     mSpiralLayout = DefaultItemLayout::New( DefaultItemLayout::SPIRAL );
@@ -350,12 +350,12 @@ public:
       case SPIRAL_LAYOUT:
       case DEPTH_LAYOUT:
       {
-        stage.GetRootLayer().SetBehavior(Layer::LAYER_3D);
+        stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
         break;
       }
       case GRID_LAYOUT:
       {
-        stage.GetRootLayer().SetBehavior(Layer::LAYER_UI);
+        stage.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
         break;
       }
     }
index 503dcc582ed030939c29a654405d6e3380c0e6f6..1680e965ef60ed3333ffa0c0b91304b780830a92 100644 (file)
@@ -235,7 +235,7 @@ public:
     stage.SetBackgroundColor( Color::WHITE );
     Vector2 stageSize = stage.GetSize();
 
-    stage.GetRootLayer().SetDepthTestDisabled(true);
+    stage.GetRootLayer().SetProperty( Layer::Property::DEPTH_TEST, false );
 
     mSize = Vector3( stageSize.x / mColumnsPerPage, stageSize.y / mRowsPerPage, 0.0f );
 
index 68957cdad003b4ee9ce72ed65aa1437ec01af013..8143183cc1627fe562cbdff16be6a70f6ac81377 100644 (file)
@@ -125,7 +125,7 @@ private:
   void CreateAnimatingScene()
   {
     mSceneActor = Layer::New();
-    mSceneActor.SetBehavior( Layer::LAYER_3D );
+    mSceneActor.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
     mSceneActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
 
     // Create and add images to the scene actor:
index 4eb57ddd94da3dbbcc0d632e3e91eefe72c66ccd..83cb06e080596a8de6f94d3d6ca7a08250c36bc5 100644 (file)
@@ -94,8 +94,8 @@ public:
     layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
     layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-    layer.SetBehavior( Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
-    layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so.
+    layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
+    layer.SetProperty( Layer::Property::DEPTH_TEST, true ); //Enable depth testing, as otherwise the 2D layer would not do so.
     stage.Add( layer );
 
     //Set up model selection buttons.
index 013c0b644ba6987a6a7c9533a7032b6f40f60556..18329bbfc7cb5741ae127b0c7e5d7b9916841e52 100644 (file)
@@ -197,8 +197,8 @@ private:
 
     mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     mLayer3D.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
-    mLayer3D.SetBehavior( Layer::LAYER_3D );
-    mLayer3D.SetDepthTestDisabled( false );
+    mLayer3D.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+    mLayer3D.SetProperty( Layer::Property::DEPTH_TEST, true );
 
 
     auto gltf = glTF(DEMO_GAME_DIR "/reflection");
index 2e14a48e3b701049ce5b0e41911bb9911cc1997b..e6732fa143dc797617f1e092ffef1fd8500d7ccd 100644 (file)
@@ -158,8 +158,8 @@ private:
     layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     // Set the parent origin to a small percentage below the center (so the demo will scale for different resolutions).
     layer.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.58f, 0.5f ) );
-    layer.SetBehavior( Layer::LAYER_UI );
-    layer.SetDepthTestDisabled( false );
+    layer.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
+    layer.SetProperty( Layer::Property::DEPTH_TEST, true );
     stage.Add( layer );
 
     // Main cube:
index 597599af8e522485f70a25260d1150c98f4782dc..d7ac08b6da47922bb1df28180ee38dfeea020510 100644 (file)
@@ -188,7 +188,7 @@ public:
     // Setup
     mView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
 
-    mContents.SetBehavior(Layer::LAYER_3D);
+    mContents.SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
     mContents.SetProperty( Actor::Property::POSITION, mTranslation );
     mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) );
     mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) );