[Text] Add some more trace marker for text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / controller / text-controller-impl-model-updater.cpp
index 280ebcd..48546c9 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
 #include <dali/public-api/math/math-utils.h>
 
 // INTERNAL INCLUDES
@@ -40,6 +41,8 @@ namespace
 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;
@@ -67,6 +70,7 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o
     // Nothing to do if no operations are pending and required.
     return false;
   }
+  DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_MODEL_UPDATE");
 
   Vector<Character>& srcCharacters = impl.mModel->mLogicalModel->mText;
   Vector<Character>  displayCharacters;
@@ -585,7 +589,8 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o
     //Mark-up processor case
     if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
        impl.mModel->mLogicalModel->mUnderlineRunsUpdated ||
-       impl.mModel->mLogicalModel->mCharacterSpacingRunsUpdated)
+       impl.mModel->mLogicalModel->mCharacterSpacingRunsUpdated ||
+       impl.mModel->mLogicalModel->mStrikethroughRunsUpdated)
     {
       impl.CopyUnderlinedFromLogicalToVisualModels(true);
       impl.CopyStrikethroughFromLogicalToVisualModels();
@@ -601,6 +606,8 @@ bool ControllerImplModelUpdater::Update(Controller::Impl& impl, OperationsMask o
   // Set the previous number of characters for the next time the text is updated.
   impl.mTextUpdateInfo.mPreviousNumberOfCharacters = numberOfCharacters;
 
+  DALI_TRACE_END(gTraceFilter, "DALI_TEXT_MODEL_UPDATE");
+
   return updated;
 }