mLoadFailed(false),
mAttemptAtlasing(false)
{
- DALI_LOG_RELEASE_INFO("SvgVisual is created: %p, mImpl : %p, url : %s\n", this, mImpl, mImageUrl.GetUrl().c_str());
// the rasterized image is with pre-multiplied alpha format
mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
}
SvgVisual::~SvgVisual()
{
- DALI_LOG_RELEASE_INFO("SvgVisual is destructed: %p, mImpl : %p, mLoadingTask : %p, mRasterizingTask : %p, url : %s\n", this, mImpl, mLoadingTask.Get(), mRasterizingTask.Get(), mImageUrl.GetUrl().c_str());
if(Stage::IsInstalled())
{
if(mLoadingTask)
textureManager.RemoveEncodedImageBuffer(mImageUrl.GetUrl());
}
}
- else if(DALI_UNLIKELY(!Stage::IsShuttingDown()))
- {
- DALI_LOG_ERROR("SvgVisual maybe try to destruct on worker thread! %p, mLoadingTask : %p, mRasterizingTask : %p, url : %s\n", this, mLoadingTask.Get(), mRasterizingTask.Get(), mImageUrl.GetUrl().c_str());
- }
}
void SvgVisual::OnInitialize()
void SvgVisual::ApplyRasterizedImage(SvgTaskPtr task)
{
- if(DALI_UNLIKELY(mImpl == nullptr))
- {
- DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! SvgVisual : %p, task : %p\n", this, task.Get());
- return;
- }
-
if(task->HasSucceeded())
{
PixelData rasterizedPixelData = task->GetPixelData();
: mImpl(new Impl(fittingMode, type)),
mFactoryCache(factoryCache)
{
- mImplOrigin = mImpl;
}
Visual::Base::~Base()
{
delete mImpl;
- mImpl = nullptr;
}
void Visual::Base::Initialize()
bool Visual::Base::IsOnScene() const
{
- if(DALI_UNLIKELY(mImplOrigin != mImpl))
- {
- DALI_LOG_ERROR("Fatal error!! Memory corruption occured! this : %p\n", this);
- DALI_LOG_ERROR("mImpl : %p, mImplOrigin : %p\n", mImpl, mImplOrigin);
- DALI_ASSERT_ALWAYS(false && "Visual::Base might got memory corruption!");
- }
return mImpl->mFlags & Impl::IS_ON_SCENE;
}