Change RenderTaskList to behave like any other SceneGraph object
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / layer-impl.cpp
index 5e51230..b790963 100644 (file)
@@ -92,7 +92,7 @@ LayerPtr Layer::New()
   return layer;
 }
 
-LayerPtr Layer::NewRoot( LayerList& layerList, UpdateManager& manager, bool systemLevel )
+LayerPtr Layer::NewRoot( LayerList& layerList, UpdateManager& manager )
 {
   LayerPtr root( new Layer( Actor::ROOT_LAYER ) );
 
@@ -100,7 +100,7 @@ LayerPtr Layer::NewRoot( LayerList& layerList, UpdateManager& manager, bool syst
   SceneGraph::Layer* rootLayer = static_cast<SceneGraph::Layer*>( root->CreateNode() );
   root->mNode = rootLayer;
   OwnerPointer< SceneGraph::Layer > transferOwnership( rootLayer );
-  InstallRootMessage( manager, transferOwnership, systemLevel );
+  InstallRootMessage( manager, transferOwnership );
 
   // root actor is immediately considered to be on-stage
   root->mIsOnStage = true;
@@ -110,6 +110,7 @@ LayerPtr Layer::NewRoot( LayerList& layerList, UpdateManager& manager, bool syst
 
   // layer-list must be set for the root layer
   root->mLayerList = &layerList;
+  layerList.SetRootLayer( &(*root) );
   layerList.RegisterLayer( *root );
 
   return root;
@@ -163,7 +164,7 @@ void Layer::RaiseAbove( const Internal::Layer& target )
   if( ( this != &target ) && OnStage() && target.OnStage() )
   {
     // get parameters depth
-    const unsigned int targetDepth = target.GetDepth();
+    const uint32_t targetDepth = target.GetDepth();
     if( GetDepth() < targetDepth )
     {
       MoveAbove( target );
@@ -177,7 +178,7 @@ void Layer::LowerBelow( const Internal::Layer& target )
   if( ( this != &target ) && OnStage() && target.OnStage() )
   {
     // get parameters depth
-    const unsigned int targetDepth = target.GetDepth();
+    const uint32_t targetDepth = target.GetDepth();
     if( GetDepth() > targetDepth )
     {
       MoveBelow( target );
@@ -256,7 +257,7 @@ void Layer::SetClippingBox(int x, int y, int width, int height)
     StagePtr stage = Stage::GetCurrent();
     if( stage )
     {
-      clippingBox.y = stage->GetSize().height - clippingBox.y - clippingBox.height;
+      clippingBox.y = static_cast<int32_t>( stage->GetSize().height ) - clippingBox.y - clippingBox.height;
 
       // layerNode is being used in a separate thread; queue a message to set the value
       SetClippingBoxMessage( GetEventThreadServices(), GetSceneLayerOnStage(), clippingBox );
@@ -363,8 +364,8 @@ void Layer::GetDefaultPropertyIndices( Property::IndexContainer& indices ) const
   Actor::GetDefaultPropertyIndices( indices ); // Actor class properties
   indices.Reserve( indices.Size() + DEFAULT_PROPERTY_COUNT );
 
-  int index = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX;
-  for ( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i, ++index )
+  int32_t index = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX;
+  for ( int32_t i = 0; i < DEFAULT_PROPERTY_COUNT; ++i, ++index )
   {
     indices.PushBack( index );
   }
@@ -439,7 +440,7 @@ Property::Index Layer::GetDefaultPropertyIndex(const std::string& name) const
   Property::Index index = Property::INVALID_INDEX;
 
   // Look for name in current class' default properties
-  for( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
+  for( int32_t i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
   {
     const Internal::PropertyDetails* property = &DEFAULT_PROPERTY_DETAILS[i];
     if( 0 == name.compare( property->name ) ) // dont want to convert rhs to string
@@ -474,7 +475,7 @@ void Layer::SetDefaultProperty( Property::Index index, const Property::Value& pr
       }
       case Dali::Layer::Property::CLIPPING_BOX:
       {
-        Rect<int> clippingBox( propertyValue.Get<Rect<int> >() );
+        Rect<int32_t> clippingBox( propertyValue.Get<Rect<int32_t> >() );
         SetClippingBox( clippingBox.x, clippingBox.y, clippingBox.width, clippingBox.height );
         break;
       }