/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
*hashTargetPtr = (info.mSamplingMode);
}
- return Dali::CalculateHash(info.mUrl) ^ Dali::CalculateHash(hashTarget);
+ return Dali::CalculateHash(std::string_view(info.mUrl.data(), info.mUrl.size())) ^ Dali::CalculateHash(hashTarget);
}
std::size_t GenerateHash(const Dali::PixelData& pixelData, bool mipmapRequired)
#include <dali-toolkit/internal/visuals/rendering-addon.h>
// EXTERNAL HEADERS
-#include <dali/devel-api/common/hash.h>
#include <dali/integration-api/adaptor-framework/adaptor.h>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/trace.h>
NPatchDataPtr NPatchLoader::GetNPatchData(const VisualUrl& url, const Rect<int>& border, bool& preMultiplyOnLoad)
{
- std::size_t hash = CalculateHash(url.GetUrl());
+ std::size_t hash = url.GetUrlHash();
std::vector<NPatchInfo>::size_type index = UNINITIALIZED_ID;
const std::vector<NPatchInfo>::size_type count = mCache.size();
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
return mUrl;
}
-std::uint64_t VisualUrl::GetUrlHash() const
+std::size_t VisualUrl::GetUrlHash() const
{
- return DALI_UNLIKELY(mUrlHash == 0) ? (mUrlHash = Dali::CalculateHash(mUrl)) : mUrlHash;
+ return DALI_UNLIKELY(mUrlHash == 0) ? (mUrlHash = Dali::CalculateHash(std::string_view(mUrl.data(), mUrl.size()))) : mUrlHash;
}
VisualUrl::Type VisualUrl::GetType() const
#define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
* Get the hash value of full URL
* @return The hash value of url
*/
- std::uint64_t GetUrlHash() const;
+ std::size_t GetUrlHash() const;
/**
* Get the visual type of the URL
Type mType;
ProtocolType mLocation;
- mutable std::uint64_t mUrlHash;
+ mutable std::size_t mUrlHash;
};
} // namespace Internal