From: taeyoon0.lee Date: Wed, 11 Oct 2017 08:26:42 +0000 (+0900) Subject: Merge branch 'devel/master (1.2.60)' into tizen_4.0 X-Git-Tag: accepted/tizen/4.0/unified/20171012.230017~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39518cbe2de0b8786c000d043d186f82b9b81bca;hp=6f5e542dfe306f91b6a3094cde65dba1eb478967;p=platform%2Fcore%2Fuifw%2Fdali-core.git Merge branch 'devel/master (1.2.60)' into tizen_4.0 Change-Id: Ide9c356938107479ed2288c81f0876a9c8f445bf --- diff --git a/dali/internal/event/events/actor-observer.cpp b/dali/internal/event/events/actor-observer.cpp index 142783d..42b9120 100644 --- a/dali/internal/event/events/actor-observer.cpp +++ b/dali/internal/event/events/actor-observer.cpp @@ -101,7 +101,7 @@ void ActorObserver::SceneObjectRemoved( Object& object ) { if ( mRemoveCallback ) { - CallbackBase::Execute( *mRemoveCallback, mActor ); +// CallbackBase::Execute( *mRemoveCallback, mActor ); } // do not call object.RemoveObserver here, object is currently iterating through observers diff --git a/dali/internal/update/modeling/scene-graph-animatable-mesh.cpp b/dali/internal/update/modeling/scene-graph-animatable-mesh.cpp new file mode 100644 index 0000000..e3e7d24 --- /dev/null +++ b/dali/internal/update/modeling/scene-graph-animatable-mesh.cpp @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2014 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// CLASS HEADER +#include + +// INTERNAL INCLUDES +#include +#include +#include + +namespace Dali +{ + +namespace Internal +{ + +namespace SceneGraph +{ + +AnimatableMesh::AnimatableMesh( ResourceManager& resourceManager, + ResourceId meshId, + const MeshData::VertexContainer& vertices ) +: mResourceManager(resourceManager), + mMeshId(meshId) +{ + mNumVertices = vertices.size(); + + // Allocate a single block of memory for all properties + // (Can't use std::vector, as AnimatableProperties is a non-copyable type). + mVertices = static_cast( operator new [] (sizeof(VertexProperties) * mNumVertices) ); + + for(unsigned int i=0; iGetMeshData(Mesh::UPDATE_THREAD); + + bool meshUpdated( false ); + MeshData::VertexContainer& oldVertices = meshData.GetVertices(); + DALI_ASSERT_DEBUG( oldVertices.size() == mNumVertices ); + DALI_ASSERT_DEBUG( oldVertices.size() > 0 ); + + MeshData::Vertex* vertices = &oldVertices.at(0); + for(std::size_t i=0; iMeshDataUpdated(updateBufferIndex, Mesh::UPDATE_THREAD, NULL); + } +} + +void AnimatableMesh::BakePosition( BufferIndex updateBufferIndex, unsigned int vertex, const Vector3& position ) +{ + mVertices[vertex].position.Bake( updateBufferIndex, position ); +} + +void AnimatableMesh::BakeColor( BufferIndex updateBufferIndex, unsigned int vertex, const Vector4& color ) +{ + mVertices[vertex].color.Bake( updateBufferIndex, color ); +} + +void AnimatableMesh::BakeTextureCoords( BufferIndex updateBufferIndex, unsigned int vertex, const Vector2& coords ) +{ + mVertices[vertex].textureCoords.Bake( updateBufferIndex, coords ); +} + +const Vector3& AnimatableMesh::GetPosition( BufferIndex bufferIndex, unsigned int vertexIndex ) +{ + return mVertices[vertexIndex].position.Get(bufferIndex); +} + +const Vector4& AnimatableMesh::GetColor( BufferIndex bufferIndex, unsigned int vertexIndex ) +{ + return mVertices[vertexIndex].color.Get(bufferIndex); +} + +const Vector2& AnimatableMesh::GetTextureCoords( BufferIndex bufferIndex, unsigned int vertexIndex ) +{ + return mVertices[vertexIndex].textureCoords.Get(bufferIndex); +} + +void AnimatableMesh::ResetDefaultProperties( BufferIndex updateBufferIndex ) +{ + for( std::size_t i=0; i