// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
+#include <dali/public-api/math/math-utils.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/bidirectional-support.h>
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS");
#endif
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
// The relative luminance of a color is defined as (L = 0.2126 * R + 0.7152 * G + 0.0722 * B)
// based on W3C Recommendations (https://www.w3.org/TR/WCAG20/)
constexpr float BRIGHTNESS_THRESHOLD = 0.179f;
// Nothing to do if no operations are pending and required.
return false;
}
+ DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_MODEL_UPDATE");
Vector<Character>& srcCharacters = impl.mModel->mLogicalModel->mText;
Vector<Character> displayCharacters;
impl.mModel->mLogicalModel->mBackgroundColorRuns.PushBack(backgroundColorRun);
Vector4 backgroundColor = impl.mModel->mVisualModel->GetBackgroundColor();
- if(backgroundColor.a == 0) // There is no text background color.
+ if(Dali::EqualsZero(backgroundColor.a)) // There is no text background color.
{
// Try use the control's background color.
if(nullptr != impl.mEditableControlInterface)
{
impl.mEditableControlInterface->GetControlBackgroundColor(backgroundColor);
- if(backgroundColor.a == 0) // There is no control background color.
+ if(Dali::EqualsZero(backgroundColor.a)) // There is no control background color.
{
// Determines black or white color according to text color.
// Based on W3C Recommendations (https://www.w3.org/TR/WCAG20/)
{
//Mark-up processor case
if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
- impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated ||
+ impl.mModel->mLogicalModel->mCharacterSpacingRunsUpdated ||
+ impl.mModel->mLogicalModel->mStrikethroughRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(true);
impl.CopyStrikethroughFromLogicalToVisualModels();