/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
factory.AddPrecompileShader(colorShader2);
factory.AddPrecompileShader(colorShader3);
factory.AddPrecompileShader(npatchShader);
+ factory.AddPrecompileShader(npatchShader); // use same shader, because check line coverage
factory.AddPrecompileShader(npatchShader2);
factory.AddPrecompileShader(customShader);
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
else if(value.GetType() == TreeNode::BOOLEAN)
{
- DALI_LOG_WARNING("\"bool\" uniforms are handled as floats in shader");
+ DALI_LOG_DEBUG_INFO("\"bool\" uniforms are handled as floats in shader");
bool value = false;
if(ReadBool(&keyValue.second, value))
{
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
else
{
- DALI_LOG_WARNING("Can't find this flag[%s]\n", optionKey.c_str());
+ DALI_LOG_ERROR("Can't find this flag[%s]\n", optionKey.c_str());
continue;
}
}
}
catch(...)
{
- DALI_LOG_WARNING("Property:'%s' type does not match value type '%s'\n",
- (*property).c_str(),
- PropertyTypes::GetName(prop.object.GetPropertyType(prop.propertyIndex)));
+ DALI_SCRIPT_WARNING("Property:'%s' type does not match value type '%s'\n",
+ (*property).c_str(),
+ PropertyTypes::GetName(prop.object.GetPropertyType(prop.propertyIndex)));
throw;
}
}
catch(...)
{
- DALI_LOG_WARNING("Property:'%s' type does not match value type '%s'\n", (*property).c_str(), PropertyTypes::GetName(prop.object.GetPropertyType(prop.propertyIndex)));
+ DALI_SCRIPT_WARNING("Property:'%s' type does not match value type '%s'\n", (*property).c_str(), PropertyTypes::GetName(prop.object.GetPropertyType(prop.propertyIndex)));
throw;
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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(!parser.Parse(data))
{
- DALI_LOG_WARNING("JSON Parse Error:%d:%d:'%s'\n",
- parser.GetErrorLineNumber(),
- parser.GetErrorColumn(),
- parser.GetErrorDescription().c_str());
+ DALI_LOG_ERROR("JSON Parse Error:%d:%d:'%s'\n",
+ parser.GetErrorLineNumber(),
+ parser.GetErrorColumn(),
+ parser.GetErrorDescription().c_str());
DALI_ASSERT_ALWAYS(!"Cannot parse JSON");
}
}
else
{
- DALI_LOG_WARNING("JSON Parse Error:%d:%d:'%s'\n",
- mParser.GetErrorLineNumber(),
- mParser.GetErrorColumn(),
- mParser.GetErrorDescription().c_str());
+ DALI_LOG_ERROR("JSON Parse Error:%d:%d:'%s'\n",
+ mParser.GetErrorLineNumber(),
+ mParser.GetErrorColumn(),
+ mParser.GetErrorDescription().c_str());
DALI_ASSERT_ALWAYS(!"Cannot parse JSON");
}
#define DALI_TOOLKIT_INTERNAL_BUILDER_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
// Warning messages usually displayed
#define DALI_SCRIPT_WARNING(format, ...) \
- DALI_LOG_WARNING("Script:" format, ##__VA_ARGS__)
+ DALI_LOG_WARNING_NOFN("Script:" format, ##__VA_ARGS__)
// Info messages are usually debug build
#define DALI_SCRIPT_INFO(format, ...) \
}
else
{
- DALI_LOG_WARNING("Control::EnableVisual(%d, %s) FAILED - NO SUCH VISUAL\n", index, enable ? "T" : "F");
+ DALI_LOG_ERROR("Control::EnableVisual(%d, %s) FAILED - NO SUCH VISUAL\n", index, enable ? "T" : "F");
}
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
else
{
- DALI_LOG_WARNING("There is no focusable in popup\n");
+ DALI_LOG_DEBUG_INFO("There is no focusable in popup\n");
}
if(focusActor)
if(!nextFocusableActor)
{
- DALI_LOG_WARNING("Can not decide next focusable actor\n");
+ DALI_LOG_DEBUG_INFO("Can not decide next focusable actor\n");
}
}
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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(impl.mController->IsTextElideEnabled() && impl.mController->GetEllipsisMode() == DevelText::Ellipsize::AUTO_SCROLL)
{
- DALI_LOG_WARNING("Tried to autoscroll while in ellipsize auto scroll mode, request ignored.\n");
+ DALI_LOG_DEBUG_INFO("Tried to autoscroll while in ellipsize auto scroll mode, request ignored.\n");
}
else
{
{
if(Self().DoesCustomPropertyExist(index) && mVariationIndexMap.find(index) != mVariationIndexMap.end())
{
- std::string tag = mVariationIndexMap[index];
- float value = propertyValue.Get<float>();
+ std::string tag = mVariationIndexMap[index];
+ float value = propertyValue.Get<float>();
Property::Map map;
mController->GetVariationsMap(map);
{
if(mController->IsMultiLineEnabled())
{
- DALI_LOG_WARNING("Attempted ellipsize auto scroll on a non SINGLE_LINE_BOX, request ignored\n");
+ DALI_LOG_DEBUG_INFO("Attempted ellipsize auto scroll on a non SINGLE_LINE_BOX, request ignored\n");
}
else
{
const int maxTextureSize = Dali::GetMaxTextureSize();
if(layoutSize.width > maxTextureSize)
{
- DALI_LOG_WARNING("layoutSize(%f) > maxTextureSize(%d): To guarantee the behavior of Texture::New, layoutSize must not be bigger than maxTextureSize\n", layoutSize.width, maxTextureSize);
+ DALI_LOG_DEBUG_INFO("layoutSize(%f) > maxTextureSize(%d): To guarantee the behavior of Texture::New, layoutSize must not be bigger than maxTextureSize\n", layoutSize.width, maxTextureSize);
layoutSize.width = maxTextureSize;
}
if(mController->GetRenderMode() == DevelTextLabel::Render::SYNC)
{
- DALI_LOG_WARNING("Render mode is sync, return\n");
+ DALI_LOG_DEBUG_INFO("Render mode is sync, return\n");
return;
}
if(mController->GetRenderMode() == DevelTextLabel::Render::SYNC)
{
- DALI_LOG_WARNING("Render mode is sync, return\n");
+ DALI_LOG_DEBUG_INFO("Render mode is sync, return\n");
return;
}
if(mController->GetRenderMode() == DevelTextLabel::Render::SYNC)
{
- DALI_LOG_WARNING("Render mode is sync, return\n");
+ DALI_LOG_DEBUG_INFO("Render mode is sync, return\n");
return;
}
mController->GetVariationsMap(variationsMap);
float variationValue = 0.f;
- auto tagPtr = variationsMap.Find(tag);
+ auto tagPtr = variationsMap.Find(tag);
if(tagPtr)
{
Property::Map map;
mController->GetVariationsMap(map);
- for(auto &[index, tag] : mVariationIndexMap)
+ for(auto& [index, tag] : mVariationIndexMap)
{
if(Self().DoesCustomPropertyExist(index))
{
- float value = Self().GetCurrentProperty(index).Get<float>();
+ float value = Self().GetCurrentProperty(index).Get<float>();
map[tag.data()] = std::round(value);
}
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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(!parser.Parse(data))
{
- DALI_LOG_WARNING("JSON Parse Error:'%s'\n", parser.GetErrorDescription().c_str());
- DALI_LOG_WARNING("JSON Parse Line :'%d (%d)'\n",
- parser.GetErrorLineNumber(),
- parser.GetErrorColumn());
+ DALI_LOG_ERROR("JSON Parse Error:'%s'\n", parser.GetErrorDescription().c_str());
+ DALI_LOG_ERROR("JSON Parse Line :'%d (%d)'\n",
+ parser.GetErrorLineNumber(),
+ parser.GetErrorColumn());
}
else
{
}
catch(...)
{
- DALI_LOG_WARNING("Error during parse JSON file '%s'\n", jsonFilePath.c_str());
+ DALI_LOG_ERROR("Error during parse JSON file '%s'\n", jsonFilePath.c_str());
return false;
}
return true;
}
else
{
- DALI_LOG_WARNING("Error loading file '%s'\n", jsonFilePath.c_str());
+ DALI_LOG_ERROR("Error loading file '%s'\n", jsonFilePath.c_str());
return false;
}
}
#include <dali-toolkit/internal/text/async-text/async-text-loader-impl.h>
// EXTERNAL INCLUDES
-#include <cmath>
#include <dali/integration-api/debug.h>
#include <dali/integration-api/pixel-data-integ.h>
#include <dali/integration-api/trace.h>
+#include <cmath>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/bidirectional-support.h>
constexpr float MAX_FLOAT = std::numeric_limits<float>::max();
const float VERTICAL_ALIGNMENT_TABLE[Text::VerticalAlignment::BOTTOM + 1] =
-{
+ {
0.0f, // VerticalAlignment::TOP
0.5f, // VerticalAlignment::CENTER
1.0f // VerticalAlignment::BOTTOM
void AsyncTextLoader::SetCustomFontDirectories(const TextAbstraction::FontPathList& customFontDirectories)
{
- for(auto &path: customFontDirectories)
+ for(auto& path : customFontDirectories)
{
mModule.GetFontClient().AddCustomFontDirectory(path);
}
mNumberOfCharacters = 0u;
mIsTextDirectionRTL = false;
- mIsTextMirrored = false;
+ mIsTextMirrored = false;
// Set the text properties to default
mTextModel->mVisualModel->SetUnderlineEnabled(false);
Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo = mTextModel->mLogicalModel->mBidirectionalParagraphInfo; // The bidirectional info per paragraph.
Vector<ColorRun>& colorRuns = mTextModel->mLogicalModel->mColorRuns; // colors of the text.
-
// Set the default font's description with the given text parameters.
TextAbstraction::FontDescription defaultFontDescription;
defaultFontDescription.family = parameters.fontFamily;
defaultFontDescription.weight = parameters.fontWeight;
- defaultFontDescription.width = parameters.fontWidth;
- defaultFontDescription.slant = parameters.fontSlant;
+ defaultFontDescription.width = parameters.fontWidth;
+ defaultFontDescription.slant = parameters.fontSlant;
mTextModel->mHorizontalAlignment = parameters.horizontalAlignment;
mTextModel->mVerticalAlignment = parameters.verticalAlignment;
mTextModel->mRemoveFrontInset = parameters.removeFrontInset;
mTextModel->mRemoveBackInset = parameters.removeBackInset;
-
////////////////////////////////////////////////////////////////////////////////
// Process the markup string if the mark-up processor is enabled.
////////////////////////////////////////////////////////////////////////////////
utf8 = reinterpret_cast<const uint8_t*>(parameters.text.c_str());
}
-
////////////////////////////////////////////////////////////////////////////////
// Convert from utf8 to utf32
////////////////////////////////////////////////////////////////////////////////
numberOfCharacters = Utf8ToUtf32(utf8, textSize, utf32Characters.Begin());
utf32Characters.Resize(numberOfCharacters);
-
////////////////////////////////////////////////////////////////////////////////
// Retrieve the Line and Word Break Info.
////////////////////////////////////////////////////////////////////////////////
// Create the paragraph info.
mTextModel->mLogicalModel->CreateParagraphInfo(0u, numberOfCharacters);
-
////////////////////////////////////////////////////////////////////////////////
// Retrieve the script runs.
////////////////////////////////////////////////////////////////////////////////
mModule.GetMultilanguageSupport().SetScripts(utf32Characters, 0u, numberOfCharacters, scripts);
-
////////////////////////////////////////////////////////////////////////////////
// Validate Fonts.
////////////////////////////////////////////////////////////////////////////////
-
float scale = parameters.fontSizeScale;
TextAbstraction::PointSize26Dot6 defaultPointSize = TextAbstraction::FontClient::DEFAULT_POINT_SIZE * scale;
defaultPointSize = parameters.fontSize * scale * numberOfPointsPerOneUnitOfPointSize;
- Property::Map *variationsMapPtr = nullptr;
+ Property::Map* variationsMapPtr = nullptr;
if(!mTextModel->mLogicalModel->mVariationsMap.Empty())
{
variationsMapPtr = &mTextModel->mLogicalModel->mVariationsMap;
validFonts,
variationsMapPtr);
-
////////////////////////////////////////////////////////////////////////////////
// Retrieve the Bidirectional info.
////////////////////////////////////////////////////////////////////////////////
// Update the layout direction policy to text model.
mTextModel->mMatchLayoutDirection = parameters.layoutDirectionPolicy;
- mIsTextMirrored = false;
+ mIsTextMirrored = false;
const Length numberOfParagraphs = mTextModel->mLogicalModel->mParagraphInfo.Count();
bidirectionalInfo.Reserve(numberOfParagraphs);
mTextModel->mLogicalModel->mCharacterDirections.Clear();
}
-
////////////////////////////////////////////////////////////////////////////////
// Retrieve the glyphs. Text shaping
////////////////////////////////////////////////////////////////////////////////
mTextModel->mVisualModel->CreateGlyphsPerCharacterTable(0u, 0u, numberOfCharacters);
mTextModel->mVisualModel->CreateCharacterToGlyphTable(0u, 0u, numberOfCharacters);
-
////////////////////////////////////////////////////////////////////////////////
// Retrieve the glyph's metrics.
////////////////////////////////////////////////////////////////////////////////
mTextModel->mVisualModel->mBackgroundColors,
mTextModel->mVisualModel->mBackgroundColorIndices);
-
////////////////////////////////////////////////////////////////////////////////
// Update visual model for markup style.
////////////////////////////////////////////////////////////////////////////////
const Vector<GlyphIndex>& charactersToGlyph = mTextModel->mVisualModel->mCharactersToGlyph;
const Vector<Length>& glyphsPerCharacter = mTextModel->mVisualModel->mGlyphsPerCharacter;
-
////////////////////////////////////////////////////////////////////////////////
// Markup underline
////////////////////////////////////////////////////////////////////////////////
// Create one run for all glyphs of all run's characters that has same properties
// This enhance performance and reduce the needed memory to store glyphs-runs
UnderlinedGlyphRun underlineGlyphRun;
- underlineGlyphRun.properties = it->properties;
+ underlineGlyphRun.properties = it->properties;
underlineGlyphRun.glyphRun.glyphIndex = charactersToGlyph[characterIndex];
underlineGlyphRun.glyphRun.numberOfGlyphs = glyphsPerCharacter[characterIndex];
// Reset flag. The updates have been applied from logical to visual.
mTextModel->mLogicalModel->mUnderlineRunsUpdated = false;
-
////////////////////////////////////////////////////////////////////////////////
// Markup strikethrough
////////////////////////////////////////////////////////////////////////////////
// Reset flag. The updates have been applied from logical to visual.
mTextModel->mLogicalModel->mStrikethroughRunsUpdated = false;
-
////////////////////////////////////////////////////////////////////////////////
// Markup character spacing
////////////////////////////////////////////////////////////////////////////////
layoutParameters.interGlyphExtraAdvance = 0.f;
// Whether the last character is a new paragraph character.
- const Character* const textBuffer = mTextModel->mLogicalModel->mText.Begin();
+ const Character* const textBuffer = mTextModel->mLogicalModel->mText.Begin();
layoutParameters.isLastNewParagraph = TextAbstraction::IsNewParagraph(*(textBuffer + (mTextModel->mLogicalModel->mText.Count() - 1u)));
// Update the ellipsis
mTextModel->mElideEnabled = ellipsisEnabled;
mTextModel->mVisualModel->SetTextElideEnabled(ellipsisEnabled);
- auto ellipsisPosition = parameters.ellipsisPosition;
+ auto ellipsisPosition = parameters.ellipsisPosition;
mTextModel->mEllipsisPosition = ellipsisPosition;
mTextModel->mVisualModel->SetEllipsisPosition(ellipsisPosition);
// Store the actual size of the text after it has been laid-out.
mTextModel->mVisualModel->SetLayoutSize(newLayoutSize);
-
////////////////////////////////////////////////////////////////////////////////
// Align the text.
////////////////////////////////////////////////////////////////////////////////
// Make transparent buffer.
// If the cutout is enabled, a separate texture is not used for the text.
Devel::PixelBuffer buffer = mTypesetter->CreateFullBackgroundBuffer(1, 1, Color::TRANSPARENT);
- renderInfo.textPixelData = Devel::PixelBuffer::Convert(buffer);
+ renderInfo.textPixelData = Devel::PixelBuffer::Convert(buffer);
// Set the flag of cutout.
renderInfo.isCutout = cutoutEnabled && (cutoutData != nullptr);
{
if(renderInfo.isCutout)
{
- float cutoutAlpha = mTextModel->GetDefaultColor().a;
+ float cutoutAlpha = mTextModel->GetDefaultColor().a;
renderInfo.stylePixelData = mTypesetter->RenderWithCutout(layoutSize, textDirection, cutoutData, Text::Typesetter::RENDER_NO_TEXT, false, Pixel::RGBA8888, cutoutAlpha);
}
else
// In case of CONSTRAINT, the natural size has already been calculated.
// So we can skip Initialize and Update at this stage.
// Only the layout is newly calculated to obtain the height.
- bool layoutOnly = (parameters.requestType == Async::RENDER_CONSTRAINT);
- float height = ComputeHeightForWidth(parameters, parameters.textWidth, layoutOnly);
+ bool layoutOnly = (parameters.requestType == Async::RENDER_CONSTRAINT);
+ float height = ComputeHeightForWidth(parameters, parameters.textWidth, layoutOnly);
// textHeight is heightConstraint.
if(parameters.textHeight < height)
}
bool layoutUpdated = false;
- Size layoutSize = Layout(parameters, layoutUpdated);
+ Size layoutSize = Layout(parameters, layoutUpdated);
// Restore actual size.
- parameters.textWidth = actualWidth;
- parameters.textHeight = actualHeight;
+ parameters.textWidth = actualWidth;
+ parameters.textHeight = actualHeight;
mTextModel->mVisualModel->mControlSize = Size(parameters.textWidth, parameters.textHeight);
return layoutSize.height;
Size naturalSize = Layout(parameters, layoutUpdated);
// Restore actual size.
- parameters.textWidth = actualWidth;
- parameters.textHeight = actualHeight;
+ parameters.textWidth = actualWidth;
+ parameters.textHeight = actualHeight;
mTextModel->mVisualModel->mControlSize = Size(parameters.textWidth, parameters.textHeight);
return naturalSize;
AsyncTextRenderInfo AsyncTextLoader::GetHeightForWidth(AsyncTextParameters& parameters)
{
- float height = ComputeHeightForWidth(parameters, parameters.textWidth, false);
+ float height = ComputeHeightForWidth(parameters, parameters.textWidth, false);
AsyncTextRenderInfo renderInfo;
renderInfo.renderedSize.width = parameters.textWidth;
renderInfo.renderedSize.height = height;
AsyncTextRenderInfo AsyncTextLoader::GetNaturalSize(AsyncTextParameters& parameters)
{
- Size textNaturalSize = ComputeNaturalSize(parameters);
+ Size textNaturalSize = ComputeNaturalSize(parameters);
AsyncTextRenderInfo renderInfo;
renderInfo.renderedSize = textNaturalSize;
renderInfo.requestType = Async::COMPUTE_NATURAL_SIZE;
if(parameters.requestType == Async::RENDER_FIXED_WIDTH || parameters.requestType == Async::RENDER_CONSTRAINT)
{
// The real height calculated during layout should be set.
- parameters.textHeight = textNaturalSize.height - (parameters.padding.top + parameters.padding.bottom);
- controlSize.height = parameters.textHeight;
+ parameters.textHeight = textNaturalSize.height - (parameters.padding.top + parameters.padding.bottom);
+ controlSize.height = parameters.textHeight;
mTextModel->mVisualModel->mControlSize = Size(parameters.textWidth, parameters.textHeight);
}
float actualWidth = parameters.textWidth;
float actualHeight = parameters.textHeight;
- parameters.textWidth = verifiedSize.width;
- parameters.textHeight = textNaturalSize.height;
+ parameters.textWidth = verifiedSize.width;
+ parameters.textHeight = textNaturalSize.height;
parameters.isAutoScrollMaxTextureExceeded = true;
bool layoutUpdated = false;
Initialize();
Update(parameters);
bool layoutUpdated = false;
- Size layoutSize = Layout(parameters, layoutUpdated);
+ Size layoutSize = Layout(parameters, layoutUpdated);
if(!layoutUpdated || layoutSize.width > allowedSize.width || layoutSize.height > allowedSize.height)
{
// In case of CONSTRAINT, the natural size has already been calculated.
// So we can skip Initialize and Update at this stage.
// Only the layout is newly calculated to obtain the height.
- bool layoutOnly = (parameters.requestType == Async::RENDER_CONSTRAINT);
- float height = ComputeHeightForWidth(parameters, parameters.textWidth, layoutOnly);
+ bool layoutOnly = (parameters.requestType == Async::RENDER_CONSTRAINT);
+ float height = ComputeHeightForWidth(parameters, parameters.textWidth, layoutOnly);
// textHeight is heightConstraint
if(parameters.textHeight > height)
{
parameters.textHeight = height;
}
- DALI_LOG_WARNING("TextFit requires a fixed size. Render with natural size : %f, %f\n", parameters.textWidth, parameters.textHeight);
+ DALI_LOG_DEBUG_INFO("TextFit requires a fixed size. Render with natural size : %f, %f\n", parameters.textWidth, parameters.textHeight);
}
if(parameters.isTextFitArrayEnabled)
}
#endif
- std::vector<DevelTextLabel::FitOption> fitOptions = parameters.textFitArray;
- int numberOfFitOptions = static_cast<int>(fitOptions.size());
+ std::vector<DevelTextLabel::FitOption> fitOptions = parameters.textFitArray;
+ int numberOfFitOptions = static_cast<int>(fitOptions.size());
if(numberOfFitOptions == 0)
{
DALI_LOG_ERROR("fitOptions is empty, render with default value, point size:%f, min line size:%f\n", parameters.fontSize, parameters.minLineSize);
// Set the first FitOption(Minimum PointSize) to the best value.
// If the search does not find an optimal value, the minimum PointSize will be used to text fit.
- DevelTextLabel::FitOption firstOption = fitOptions.front();
- bool bestSizeUpdatedLatest = false;
- float bestPointSize = firstOption.GetPointSize();
- float bestMinLineSize = firstOption.GetMinLineSize();
+ DevelTextLabel::FitOption firstOption = fitOptions.front();
+ bool bestSizeUpdatedLatest = false;
+ float bestPointSize = firstOption.GetPointSize();
+ float bestMinLineSize = firstOption.GetMinLineSize();
if(binarySearch)
{
- int left = 0u;
+ int left = 0u;
int right = numberOfFitOptions - 1;
- while (left <= right)
+ while(left <= right)
{
- int mid = left + (right - left) / 2;
- DevelTextLabel::FitOption option = fitOptions[mid];
- float testPointSize = option.GetPointSize();
- float testMinLineSize = option.GetMinLineSize();
- parameters.minLineSize = testMinLineSize;
+ int mid = left + (right - left) / 2;
+ DevelTextLabel::FitOption option = fitOptions[mid];
+ float testPointSize = option.GetPointSize();
+ float testMinLineSize = option.GetMinLineSize();
+ parameters.minLineSize = testMinLineSize;
if(CheckForTextFit(parameters, testPointSize, allowedSize))
{
bestSizeUpdatedLatest = true;
- bestPointSize = testPointSize;
- bestMinLineSize = testMinLineSize;
- left = mid + 1;
+ bestPointSize = testPointSize;
+ bestMinLineSize = testMinLineSize;
+ left = mid + 1;
}
else
{
bestSizeUpdatedLatest = false;
- right = mid - 1;
+ right = mid - 1;
}
}
}
// If binary search is not possible, search sequentially starting from the largest PointSize.
for(auto it = fitOptions.rbegin(); it != fitOptions.rend(); ++it)
{
- DevelTextLabel::FitOption option = *it;
- float testPointSize = option.GetPointSize();
- float testMinLineSize = option.GetMinLineSize();
- parameters.minLineSize = testMinLineSize;
+ DevelTextLabel::FitOption option = *it;
+ float testPointSize = option.GetPointSize();
+ float testMinLineSize = option.GetMinLineSize();
+ parameters.minLineSize = testMinLineSize;
if(CheckForTextFit(parameters, testPointSize, allowedSize))
{
bestSizeUpdatedLatest = true;
- bestPointSize = testPointSize;
- bestMinLineSize = testMinLineSize;
+ bestPointSize = testPointSize;
+ bestMinLineSize = testMinLineSize;
break;
}
else
}
#endif
- float minPointSize = parameters.textFitMinSize;
- float maxPointSize = parameters.textFitMaxSize;
- float pointInterval = parameters.textFitStepSize;
+ float minPointSize = parameters.textFitMinSize;
+ float maxPointSize = parameters.textFitMaxSize;
+ float pointInterval = parameters.textFitStepSize;
mFitActualEllipsis = parameters.ellipsis;
parameters.ellipsis = false;
{
namespace Internal
{
-
AsyncTextManager::AsyncTextManager()
: mLocale(),
mTaskId(0u),
}
else
{
- DALI_LOG_WARNING("LoadComplete -> Running task already removed! : %u\n", taskId);
+ DALI_LOG_DEBUG_INFO("LoadComplete -> Running task already removed! : %u\n", taskId);
}
for(auto iter = mRunningLoaders.begin(); iter != mRunningLoaders.end(); ++iter)
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
}
else
{
- DALI_LOG_WARNING("Attempted AutoScrolling on a non SINGLE_LINE_BOX, request ignored\n");
+ DALI_LOG_DEBUG_INFO("Attempted AutoScrolling on a non SINGLE_LINE_BOX, request ignored\n");
mIsAutoScrollEnabled = false;
}
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
default:
{
- DALI_LOG_WARNING("Unknown renderer type: %d\n", renderingType);
+ DALI_LOG_ERROR("Unknown renderer type: %d\n", renderingType);
break;
}
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
{
namespace Internal
{
-
FadeTransitionPtr FadeTransition::New(Dali::Toolkit::Control control, float opacity, TimePeriod timePeriod)
{
float delaySeconds = timePeriod.delaySeconds;
if(delaySeconds < 0.0f)
{
- DALI_LOG_WARNING("delay should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("delay should be greater than 0.0f.\n");
delaySeconds = 0.0f;
}
float durationSeconds = timePeriod.durationSeconds;
if(durationSeconds < 0.0f)
{
- DALI_LOG_WARNING("duration should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("duration should be greater than 0.0f.\n");
durationSeconds = 0.0f;
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
{
namespace Internal
{
-
ScaleTransitionPtr ScaleTransition::New(Dali::Toolkit::Control control, const Vector2& scaleFactor, TimePeriod timePeriod)
{
float delaySeconds = timePeriod.delaySeconds;
if(delaySeconds < 0.0f)
{
- DALI_LOG_WARNING("delay should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("delay should be greater than 0.0f.\n");
delaySeconds = 0.0f;
}
float durationSeconds = timePeriod.durationSeconds;
if(durationSeconds < 0.0f)
{
- DALI_LOG_WARNING("duration should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("duration should be greater than 0.0f.\n");
durationSeconds = 0.0f;
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
float delaySeconds = timePeriod.delaySeconds;
if(delaySeconds < 0.0f)
{
- DALI_LOG_WARNING("delay should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("delay should be greater than 0.0f.\n");
delaySeconds = 0.0f;
}
float durationSeconds = timePeriod.durationSeconds;
if(durationSeconds < 0.0f)
{
- DALI_LOG_WARNING("duration should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("duration should be greater than 0.0f.\n");
durationSeconds = 0.0f;
}
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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(timePeriod.durationSeconds < 0.0f)
{
- DALI_LOG_WARNING("Duration should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("Duration should be greater than 0.0f.\n");
}
else
{
if(timePeriod.delaySeconds < 0.0f)
{
- DALI_LOG_WARNING("Delay should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("Delay should be greater than 0.0f.\n");
return;
}
else
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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.
float delaySeconds = timePeriod.delaySeconds;
if(delaySeconds < 0.0f)
{
- DALI_LOG_WARNING("delay should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("delay should be greater than 0.0f.\n");
delaySeconds = 0.0f;
}
float durationSeconds = timePeriod.durationSeconds;
if(durationSeconds < 0.0f)
{
- DALI_LOG_WARNING("duration should be greater than 0.0f.\n");
+ DALI_LOG_DEBUG_INFO("duration should be greater than 0.0f.\n");
durationSeconds = 0.0f;
}
}
default:
{
- DALI_LOG_WARNING("Unknown option[%d]. maybe this type can't use this flag\n", static_cast<int>(option[i]));
+ DALI_LOG_ERROR("Unknown option[%d]. maybe this type can't use this flag\n", static_cast<int>(option[i]));
break;
}
}
{
if(ShaderTypePredefines[i] == shader)
{
- DALI_LOG_WARNING("This shader already added list(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(ShaderTypePredefines[i], VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already added list(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(ShaderTypePredefines[i], VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
{
if(mRequestedPrecompileShader[i].type == shader)
{
- DALI_LOG_WARNING("This shader already requsted(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already requsted(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
}
default:
{
- DALI_LOG_WARNING("Unknown option[%d]. maybe this type can't use this flag\n", static_cast<int>(option[i]));
+ DALI_LOG_ERROR("Unknown option[%d]. maybe this type can't use this flag\n", static_cast<int>(option[i]));
break;
}
}
{
if(ShaderTypePredefines[i] == shader)
{
- DALI_LOG_WARNING("This shader already added list(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(ShaderTypePredefines[i], VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already added list(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(ShaderTypePredefines[i], VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
{
if(mRequestedPrecompileShader[i].type == shader)
{
- DALI_LOG_WARNING("This shader already requsted(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already requsted(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
/*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 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(mRequestedPrecompileShader[i].type == shader)
{
- DALI_LOG_WARNING("This shader already requsted(%s).", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already requsted(%s).", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
if(mSlices > MAX_PARTITIONS)
{
mSlices = MAX_PARTITIONS;
- DALI_LOG_WARNING("Value for slices clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for slices clamped.\n");
}
else if(mSlices < MIN_SLICES)
{
mSlices = MIN_SLICES;
- DALI_LOG_WARNING("Value for slices clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for slices clamped.\n");
}
}
else
if(mStacks > MAX_PARTITIONS)
{
mStacks = MAX_PARTITIONS;
- DALI_LOG_WARNING("Value for stacks clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for stacks clamped.\n");
}
else if(mStacks < MIN_STACKS)
{
mStacks = MIN_STACKS;
- DALI_LOG_WARNING("Value for stacks clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for stacks clamped.\n");
}
}
else
if(mScaleDimensions.x <= 0.0)
{
mScaleDimensions.x = 1.0;
- DALI_LOG_WARNING("Value for scale dimensions clamped. Must be greater than zero.\n");
+ DALI_LOG_DEBUG_INFO("Value for scale dimensions clamped. Must be greater than zero.\n");
}
if(mScaleDimensions.y <= 0.0)
{
mScaleDimensions.y = 1.0;
- DALI_LOG_WARNING("Value for scale dimensions clamped. Must be greater than zero.\n");
+ DALI_LOG_DEBUG_INFO("Value for scale dimensions clamped. Must be greater than zero.\n");
}
if(mScaleDimensions.z <= 0.0)
{
mScaleDimensions.z = 1.0;
- DALI_LOG_WARNING("Value for scale dimensions clamped. Must be greater than zero.\n");
+ DALI_LOG_DEBUG_INFO("Value for scale dimensions clamped. Must be greater than zero.\n");
}
}
else
if(mBevelPercentage < MIN_BEVEL_PERCENTAGE)
{
mBevelPercentage = MIN_BEVEL_PERCENTAGE;
- DALI_LOG_WARNING("Value for bevel percentage clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for bevel percentage clamped.\n");
}
else if(mBevelPercentage > MAX_BEVEL_PERCENTAGE)
{
mBevelPercentage = MAX_BEVEL_PERCENTAGE;
- DALI_LOG_WARNING("Value for bevel percentage clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for bevel percentage clamped.\n");
}
}
else
if(mBevelSmoothness < MIN_SMOOTHNESS)
{
mBevelSmoothness = MIN_SMOOTHNESS;
- DALI_LOG_WARNING("Value for bevel smoothness clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for bevel smoothness clamped.\n");
}
else if(mBevelSmoothness > MAX_SMOOTHNESS)
{
mBevelSmoothness = MAX_SMOOTHNESS;
- DALI_LOG_WARNING("Value for bevel smoothness clamped.\n");
+ DALI_LOG_DEBUG_INFO("Value for bevel smoothness clamped.\n");
}
}
else
}
default:
{
- DALI_LOG_WARNING("Unknown option[%d]. maybe this type can't use this flag\n", static_cast<int>(option[i]));
+ DALI_LOG_ERROR("Unknown option[%d]. maybe this type can't use this flag\n", static_cast<int>(option[i]));
break;
}
}
{
if(ShaderTypePredefines[i] == shader)
{
- DALI_LOG_WARNING("This shader already added list(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(ShaderTypePredefines[i], VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already added list(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(ShaderTypePredefines[i], VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
{
if(mRequestedPrecompileShader[i].type == shader)
{
- DALI_LOG_WARNING("This shader already requsted(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
+ DALI_LOG_DEBUG_INFO("This shader already requsted(%s).\n", Scripting::GetLinearEnumerationName<VisualFactoryCache::ShaderType>(mRequestedPrecompileShader[i].type, VISUAL_SHADER_TYPE_TABLE, VISUAL_SHADER_TYPE_TABLE_COUNT));
return false;
}
}
if(parameters.textWidth > maxTextureSize)
{
- DALI_LOG_WARNING("layoutSize(%f) > maxTextureSize(%d): To guarantee the behavior of Texture::New, layoutSize must not be bigger than maxTextureSize\n", parameters.textWidth, maxTextureSize);
+ DALI_LOG_DEBUG_INFO("layoutSize(%f) > maxTextureSize(%d): To guarantee the behavior of Texture::New, layoutSize must not be bigger than maxTextureSize\n", parameters.textWidth, maxTextureSize);
parameters.textWidth = maxTextureSize;
}
else if(animator.animationType == TransitionData::AnimationType::BY)
{
// To Do
- DALI_LOG_WARNING("AnimationType::By is not supported yet. \n");
+ DALI_LOG_ERROR("AnimationType::By is not supported yet. \n");
}
else
{