X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fevent%2Frendering%2Fvertex-buffer-impl.cpp;h=b6bbf3211dc2b3f7532b2519f835df3151789a11;hb=41da2a3a30b5f805876d50fae170e07592c33e86;hp=462fc9cb72530bcd1f2997a66d642c648555847d;hpb=da4ad1b400618f4663547453326cffa8a6c789cc;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/event/rendering/vertex-buffer-impl.cpp b/dali/internal/event/rendering/vertex-buffer-impl.cpp index 462fc9c..b6bbf32 100644 --- a/dali/internal/event/rendering/vertex-buffer-impl.cpp +++ b/dali/internal/event/rendering/vertex-buffer-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -155,7 +155,7 @@ void VertexBuffer::SetData(const void* data, uint32_t size) // create a new DALi vector to store the buffer data // the heap allocated vector will end up being owned by Render::VertexBuffer OwnerPointer > bufferCopy = new Dali::Vector(); - bufferCopy->Resize(bufferSize); + bufferCopy->ResizeUninitialized(bufferSize); // copy the data const uint8_t* source = static_cast(data); @@ -222,6 +222,15 @@ void VertexBuffer::Initialize(Dali::Property::Map& formatMap) Property::Type type = Property::Type(component.second.Get()); // Get the size and alignment + if(type == Property::NONE) + { + /* Note, Property::Value() has an explicit constructor using Property::Type enum, + * which will generate a property value of that type. This constructor is used when + * using C++ initializer lists. + */ + type = component.second.GetType(); + } + if((type == Property::NONE) || (type == Property::STRING) || (type == Property::ARRAY) || @@ -229,6 +238,7 @@ void VertexBuffer::Initialize(Dali::Property::Map& formatMap) { DALI_ABORT("Property::Type not supported in VertexBuffer"); } + uint32_t elementSize = GetPropertyImplementationSize(type); uint32_t elementAlignment = GetPropertyImplementationAlignment(type);