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 c4d4cf2..a07e5f9 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 408d5c5..ab43a07 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 fd4ce0a..ba73d76 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 b3819e7..78aff54 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 0d5acb4..b488674 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 c409dc2..517cf69 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 677232d..55e2c5b 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 503dcc5..1680e96 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 68957cd..8143183 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 4eb57dd..83cb06e 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 013c0b6..18329bb 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 2e14a48..e6732fa 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 597599a..d7ac08b 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 ) );