We can remove useless copy operation when we request to load
json file by raw buffer.
Change-Id: Ifc19e9090901c25cb442c270ba87946574ad54e7
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
std::string jsonData(data.Begin(), data.End()); ///< Convert from raw buffer to string.
auto hashValue = Dali::CalculateHash(data); ///< Will be used for rlottie internal cache system.
- mVectorRenderer = rlottie::Animation::loadFromData(jsonData, std::to_string(hashValue));
+ mVectorRenderer = rlottie::Animation::loadFromData(std::move(jsonData), std::to_string(hashValue));
if(!mVectorRenderer)
{
DALI_LOG_ERROR("Failed to load a Lottie data [data size : %zu byte] [%p]\n", data.Size(), this);