For example, remote image loading might be heavy process.
So let we give some hints for this tasks priority as LOW.
If we set priority as low, Remote image loading didn't use
whole AsyncTaskManager's threads.
Change-Id: Ife22517deff47b7f4da769bad2b97f472fa8efef
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
// INTERNAL INCLUDES
#include <dali-scene3d/public-api/loader/environment-map-loader.h>
-
namespace Dali
{
namespace Scene3D
{
namespace Internal
{
-
EnvironmentMapLoadTask::EnvironmentMapLoadTask(const std::string& environmentMapUrl, Dali::Scene3D::EnvironmentMapType environmentMapType, CallbackBase* callback)
: AsyncTask(callback),
mEnvironmentMapUrl(environmentMapUrl),
Dali::Texture EnvironmentMapLoadTask::GetLoadedTexture()
{
- return (HasSucceeded()) ? mEnvironmentMapData.GetTexture() : Texture();;
+ return (HasSucceeded()) ? mEnvironmentMapData.GetTexture() : Texture();
}
} // namespace Internal
mResourceDirectoryUrl = std::string(modelUrl.parent_path()) + "/";
}
- Dali::Scene3D::Loader::ResourceBundle::PathProvider pathProvider = [&](Dali::Scene3D::Loader::ResourceType::Value type)
- {
+ Dali::Scene3D::Loader::ResourceBundle::PathProvider pathProvider = [&](Dali::Scene3D::Loader::ResourceType::Value type) {
return mResourceDirectoryUrl;
};
/*
- * 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.
}
LoadingTask::LoadingTask(uint32_t id, const VisualUrl& url, ImageDimensions dimensions, FittingMode::Type fittingMode, SamplingMode::Type samplingMode, bool orientationCorrection, DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad, bool loadPlanes, CallbackBase* callback)
-: AsyncTask(callback),
+: AsyncTask(callback, url.GetProtocolType() == VisualUrl::ProtocolType::REMOTE ? AsyncTask::PriorityType::LOW : AsyncTask::PriorityType::HIGH),
url(url),
encodedImageBuffer(),
id(id),
} // unnamed namespace
VectorAnimationTask::VectorAnimationTask(VisualFactoryCache& factoryCache)
-: AsyncTask(MakeCallback(this, &VectorAnimationTask::TaskCompleted), AsyncTask::ThreadType::WORKER_THREAD),
+: AsyncTask(MakeCallback(this, &VectorAnimationTask::TaskCompleted), AsyncTask::PriorityType::HIGH, AsyncTask::ThreadType::WORKER_THREAD),
mUrl(),
mVectorRenderer(VectorAnimationRenderer::New()),
mAnimationData(),