X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali%2Finternal%2Fupdate%2Fnodes%2Fscene-graph-layer.cpp;h=d23419cfd0a3fcfb574dda569e6778faf5818164;hb=db9cfcd683be8e4b3a1f83f6378e493770eb9533;hp=73709d27ad2f55fdef0af65b09224edba9066260;hpb=8c3caa8bda5ec3573039af783dd81789fb1cc871;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/nodes/scene-graph-layer.cpp b/dali/internal/update/nodes/scene-graph-layer.cpp old mode 100644 new mode 100755 index 73709d2..d23419c --- a/dali/internal/update/nodes/scene-graph-layer.cpp +++ b/dali/internal/update/nodes/scene-graph-layer.cpp @@ -31,19 +31,19 @@ namespace Internal namespace SceneGraph { -SceneGraph::Layer* Layer::New( unsigned int id ) +SceneGraph::Layer* Layer::New() { // Layers are currently heap allocated, unlike Nodes which are in a memory pool // However Node::Delete( layer ) will correctly delete a layer / node depending on type - return new Layer( id ); + return new Layer(); } -Layer::Layer( unsigned int id ) -: Node( id ), +Layer::Layer() +: Node(), mSortFunction( Internal::Layer::ZValue ), mClippingBox( 0,0,0,0 ), mLastCamera( NULL ), - mBehavior( Dali::Layer::LAYER_2D ), + mBehavior( Dali::Layer::LAYER_UI ), mIsClipping( false ), mDepthTestDisabled( true ), mIsDefaultSortFunction( true ) @@ -64,6 +64,7 @@ void Layer::SetSortFunction( Dali::Layer::SortFunctionType function ) { if( mSortFunction != function ) { + SetPropertyDirty( true ); // is a custom sort function used if( function != Internal::Layer::ZValue ) { @@ -84,21 +85,25 @@ void Layer::SetSortFunction( Dali::Layer::SortFunctionType function ) void Layer::SetClipping(bool enabled) { mIsClipping = enabled; + SetPropertyDirty( true ); } void Layer::SetClippingBox(const Dali::ClippingBox& box) { mClippingBox.Set(box.x, box.y, box.width, box.height); + SetPropertyDirty( true ); } void Layer::SetBehavior( Dali::Layer::Behavior behavior ) { mBehavior = behavior; + SetPropertyDirty( true ); } void Layer::SetDepthTestDisabled( bool disable ) { mDepthTestDisabled = disable; + SetPropertyDirty( true ); } bool Layer::IsDepthTestDisabled() const @@ -114,15 +119,6 @@ void Layer::ClearRenderables() } // namespace SceneGraph -template <> -void OwnerPointer::Reset() -{ - if( mObject != NULL ) - { - Dali::Internal::SceneGraph::Node::Delete( mObject ); - mObject = NULL; - } -} } // namespace Internal } // namespace Dali