X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fcommon%2Fproperty-owner.cpp;h=81ca85c66a5b830ddcc847902489dc4c211a8a02;hb=55827866fcb8c7ee47581ac4335a3390472090e8;hp=87b3d31dc53d034ea6b9eec6f50681d604b8fbf5;hpb=54385ee556a829f8c83d8bb651446864f6912d19;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/common/property-owner.cpp b/dali/internal/update/common/property-owner.cpp old mode 100644 new mode 100755 index 87b3d31..81ca85c --- a/dali/internal/update/common/property-owner.cpp +++ b/dali/internal/update/common/property-owner.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -110,36 +110,21 @@ void PropertyOwner::DisconnectFromSceneGraph( BufferIndex updateBufferIndex ) mConstraints.Clear(); } -void PropertyOwner::InstallCustomProperty(PropertyBase* property) +void PropertyOwner::InstallCustomProperty( OwnerPointer& property ) { - DALI_ASSERT_DEBUG( NULL != property ); - - mCustomProperties.PushBack( property ); + mCustomProperties.PushBack( property.Release() ); } -void PropertyOwner::ResetToBaseValues( BufferIndex updateBufferIndex ) -{ - // Reset custom properties - const OwnedPropertyIter endIter = mCustomProperties.End(); - for ( OwnedPropertyIter iter = mCustomProperties.Begin(); endIter != iter; ++iter ) - { - (*iter)->ResetToBaseValue( updateBufferIndex ); - } - - // Notification for derived classes, to reset default properties - ResetDefaultProperties( updateBufferIndex ); -} ConstraintOwnerContainer& PropertyOwner::GetConstraints() { return mConstraints; } -void PropertyOwner::ApplyConstraint( ConstraintBase* constraint ) +void PropertyOwner::ApplyConstraint( OwnerPointer& constraint ) { - mConstraints.PushBack( constraint ); - constraint->OnConnect(); + mConstraints.PushBack( constraint.Release() ); } void PropertyOwner::RemoveConstraint( ConstraintBase* constraint ) @@ -161,9 +146,9 @@ PropertyOwner::PropertyOwner() { } -void PropertyOwner::AddUniformMapping( UniformPropertyMapping* map ) +void PropertyOwner::AddUniformMapping( OwnerPointer< UniformPropertyMapping >& map ) { - mUniformMaps.Add( map ); + mUniformMaps.Add( map.Release() ); } void PropertyOwner::RemoveUniformMapping( const std::string& uniformName ) @@ -186,7 +171,15 @@ void PropertyOwner::RemoveUniformMapObserver( UniformMap::Observer& observer ) mUniformMaps.RemoveObserver( observer ); } +void PropertyOwner::SetPropertyDirty( bool value ) +{ + mPropertyDirty = value; +} +bool PropertyOwner::IsPropertyDirty() const +{ + return mPropertyDirty; +} } // namespace SceneGraph