VectorImageRenderer::~VectorImageRenderer()
{
+ Mutex::ScopedLock lock(mMutex);
#ifdef THORVG_SUPPORT
//NOTE: Initializer::term() will call clear() internally.
bool VectorImageRenderer::Load(const Vector<uint8_t>& data, float dpi)
{
+ Mutex::ScopedLock lock(mMutex);
#ifdef THORVG_SUPPORT
if(!mSwCanvas)
{
Dali::Devel::PixelBuffer VectorImageRenderer::Rasterize(uint32_t width, uint32_t height)
{
+ Mutex::ScopedLock lock(mMutex);
+
if(width == 0)
{
if(mDefaultWidth == 0)
*/
// EXTERNAL INCLUDES
+#include <dali/devel-api/threading/mutex.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/signals/connection-tracker.h>
+
#ifdef THORVG_SUPPORT
#include <thorvg.h>
#endif
NSVGimage* mParsedImage{nullptr};
NSVGrasterizer* mRasterizer{nullptr};
#endif
- uint32_t mDefaultWidth{0}; ///< The default width of the file
- uint32_t mDefaultHeight{0}; ///< The default height of the file
+ Dali::Mutex mMutex{}; ///< The mutex
+ uint32_t mDefaultWidth{0}; ///< The default width of the file
+ uint32_t mDefaultHeight{0}; ///< The default height of the file
};
} // namespace Adaptor