/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
}
}
+ mRasterizingTask.Reset(); // We don't need it anymore
+
//If there are accumulated changes to CanvasRenderer during Rasterize, Rasterize once again.
if(mCanvasRenderer && mCanvasRenderer.IsCanvasChanged())
{
if(IsSynchronousLoadingRequired() && mImageUrl.IsLocalResource())
{
mLoadingTask->Process();
- mLoadingTask.Reset(); // We don't need it now
+ if(!mLoadingTask->HasSucceeded())
+ {
+ mLoadFailed = true;
+ }
+ mLoadingTask.Reset(); // We don't need it anymore.
}
else
{
{
mRasterizingTask->Process();
ApplyRasterizedImage(mRasterizingTask);
- mRasterizingTask.Reset(); // We don't need it now
+ mRasterizingTask.Reset(); // We don't need it anymore.
}
else
{
ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
}
+
+ // We don't need to keep tasks anymore. reset now.
+ if(task == mLoadingTask)
+ {
+ mLoadingTask.Reset();
+ }
+ if(task == mRasterizingTask)
+ {
+ mRasterizingTask.Reset();
+ }
}
void SvgVisual::OnSetTransform()