/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
if(mPicture)
{
delete(mPicture);
- mPicture = nullptr;
}
tvg::Initializer::term(tvg::CanvasEngine::Sw);
if(mParsedImage)
{
nsvgDelete(mParsedImage);
- mParsedImage = nullptr;
}
if(mRasterizer)
{
nsvgDeleteRasterizer(mRasterizer);
- mRasterizer = nullptr;
}
#endif
}
bool VectorImageRenderer::Load(const Vector<uint8_t>& data, float dpi)
{
Mutex::ScopedLock lock(mMutex);
-
#ifdef THORVG_SUPPORT
if(!mSwCanvas)
{
break;
}
}
-
- // Destroy mPicture and make it as nullptr, so we can notify that we fail to load svg file.
- if(mParsedImage)
- {
- delete(mPicture);
- mPicture = nullptr;
- }
-
return false;
}
if(!mParsedImage || !mParsedImage->shapes)
{
DALI_LOG_ERROR("VectorImageRenderer::Load: nsvgParse failed\n");
-
- // Destroy mParsedImage and make it as nullptr, so we can notify that we fail to load svg file.
- if(mParsedImage)
- {
- nsvgDelete(mParsedImage);
- mParsedImage = nullptr;
- }
-
return false;
}