From: Bowon Ryu Date: Fri, 26 Jul 2024 07:58:15 +0000 (+0900) Subject: Add some trace log to async text X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7876ca3ae64d8cd001bb6b3acd8a875c657a359;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git Add some trace log to async text Change-Id: Icccde8951ee684785fa6b9c9f5faec4ef6ef89de Signed-off-by: Bowon Ryu --- diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index d5af313..355061d 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -1387,7 +1387,7 @@ void TextLabel::OnRelayout(const Vector2& size, RelayoutContainer& container) return; } - DALI_LOG_RELEASE_INFO("Request size : %f, %f\n", contentSize.width, contentSize.height); + DALI_LOG_RELEASE_INFO("Async render request, size : %f, %f\n", contentSize.width, contentSize.height); AsyncTextParameters parameters = GetAsyncTextParameters(Async::RENDER_FIXED_SIZE, contentSize, padding, layoutDirection); TextVisual::UpdateAsyncRenderer(mVisual, parameters); mTextUpdateNeeded = false; diff --git a/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp b/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp index 5bcb536..93a71f4 100644 --- a/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp +++ b/dali-toolkit/internal/text/async-text/async-text-loader-impl.cpp @@ -21,6 +21,7 @@ // EXTERNAL INCLUDES #include #include +#include // INTERNAL INCLUDES #include @@ -31,10 +32,6 @@ #include #include -#if defined(DEBUG_ENABLED) -Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_ASYNC_TEXT_LOADER"); -#endif - namespace Dali { namespace Toolkit @@ -49,13 +46,14 @@ const float VERTICAL_ALIGNMENT_TABLE[Text::VerticalAlignment::BOTTOM + 1] = 0.5f, // VerticalAlignment::CENTER 1.0f // VerticalAlignment::BOTTOM }; + +DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_ASYNC, false); } // namespace namespace Text { namespace Internal { - const float TO_POINT_26_DOT_6 = 64.f; AsyncTextLoader::AsyncTextLoader() @@ -69,8 +67,6 @@ AsyncTextLoader::AsyncTextLoader() mModuleClearNeeded(false), mMutex() { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::AsyncTextLoader\n"); - mModule = Dali::Toolkit::Text::AsyncTextModule::New(); mTextModel = Model::New(); @@ -166,11 +162,11 @@ void AsyncTextLoader::ClearTextModelData() void AsyncTextLoader::Update(AsyncTextParameters& parameters) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::Update\n"); + DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_ASYNC_UPDATE"); if(parameters.text.empty()) { - DALI_LOG_RELEASE_INFO("Text is empty\n"); + DALI_LOG_ERROR("Text is empty\n"); return; } @@ -631,7 +627,7 @@ void AsyncTextLoader::Update(AsyncTextParameters& parameters) Size AsyncTextLoader::Layout(AsyncTextParameters& parameters, bool& updated) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::Layout\n"); + DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_ASYNC_LAYOUT"); //////////////////////////////////////////////////////////////////////////////// // Layout the text. @@ -654,7 +650,7 @@ Size AsyncTextLoader::Layout(AsyncTextParameters& parameters, bool& updated) numberOfCharacters > charactersToGlyph.Count() || (lastIndex > charactersToGlyph.Count() && charactersToGlyph.Count() > 0u)) { - DALI_LOG_ERROR("AsyncTextLoader::Layout: Attempting to access invalid buffer\n"); + DALI_LOG_ERROR("Attempting to access invalid buffer\n"); DALI_LOG_ERROR("Current text is: %s\n", parameters.text.c_str()); DALI_LOG_ERROR("startIndex: %u, lastIndex: %u, requestedNumberOfCharacters: %u, charactersToGlyph.Count = %lu, glyphsPerCharacter.Count = %lu\n", startIndex, lastIndex, numberOfCharacters, charactersToGlyph.Count(), glyphsPerCharacter.Count()); return Size::ZERO; @@ -668,7 +664,7 @@ Size AsyncTextLoader::Layout(AsyncTextParameters& parameters, bool& updated) mTextModel->mVisualModel->SetLayoutSize(Size::ZERO); // Nothing else to do if there is no glyphs. - DALI_LOG_RELEASE_INFO("AsyncTextLoader::Layout no glyphs\n"); + DALI_LOG_RELEASE_INFO("no glyphs\n"); return Size::ZERO; } @@ -788,14 +784,19 @@ Size AsyncTextLoader::Layout(AsyncTextParameters& parameters, bool& updated) } } - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::Layout ControlSize : %f, %f, LayoutSize : %f, %f\n", textLayoutArea.x, textLayoutArea.y, newLayoutSize.x, newLayoutSize.y); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("ControlSize : %f, %f, LayoutSize : %f, %f\n", textLayoutArea.x, textLayoutArea.y, newLayoutSize.x, newLayoutSize.y); + } +#endif return newLayoutSize; } AsyncTextRenderInfo AsyncTextLoader::Render(AsyncTextParameters& parameters) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::Render\n"); + DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_ASYNC_RENDER"); // render test mTypesetter->SetFontClient(mModule.GetFontClient()); @@ -872,7 +873,12 @@ AsyncTextRenderInfo AsyncTextLoader::Render(AsyncTextParameters& parameters) layoutSize.y = parameters.textHeight + (parameters.padding.top + parameters.padding.bottom); } - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::Render ControlSize : %f, %f, LayoutSize : %f, %f\n", parameters.textWidth, parameters.textHeight, layoutSize.x, layoutSize.y); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("ControlSize : %f, %f, LayoutSize : %f, %f\n", parameters.textWidth, parameters.textHeight, layoutSize.x, layoutSize.y); + } +#endif // Check the text direction Toolkit::DevelText::TextDirection::Type textDirection = mIsTextDirectionRTL ? Toolkit::DevelText::TextDirection::RIGHT_TO_LEFT : Toolkit::DevelText::TextDirection::LEFT_TO_RIGHT; @@ -954,7 +960,7 @@ AsyncTextRenderInfo AsyncTextLoader::Render(AsyncTextParameters& parameters) AsyncTextRenderInfo AsyncTextLoader::RenderText(AsyncTextParameters& parameters) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::RenderText\n"); + DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_ASYNC_RENDER_TEXT"); if(parameters.requestType == Async::RENDER_CONSTRAINT) { @@ -1001,7 +1007,12 @@ AsyncTextRenderInfo AsyncTextLoader::RenderText(AsyncTextParameters& parameters) float AsyncTextLoader::ComputeHeightForWidth(AsyncTextParameters& parameters, float width, bool layoutOnly) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::ComputeHeightForWidth\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("ComputeHeightForWidth, width:%f, layoutOnly:%d\n", width, layoutOnly); + } +#endif float actualWidth = parameters.textWidth; float actualHeight = parameters.textHeight; @@ -1028,7 +1039,12 @@ float AsyncTextLoader::ComputeHeightForWidth(AsyncTextParameters& parameters, fl Size AsyncTextLoader::ComputeNaturalSize(AsyncTextParameters& parameters) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::ComputeNaturalSize\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("ComputeNaturalSize\n"); + } +#endif float actualWidth = parameters.textWidth; float actualHeight = parameters.textHeight; @@ -1076,7 +1092,7 @@ AsyncTextRenderInfo AsyncTextLoader::GetNaturalSize(AsyncTextParameters& paramet AsyncTextRenderInfo AsyncTextLoader::RenderAutoScroll(AsyncTextParameters& parameters) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::RenderAutoScroll\n"); + DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_ASYNC_RENDER_AUTO_SCROLL"); Size controlSize(parameters.textWidth, parameters.textHeight); @@ -1093,7 +1109,12 @@ AsyncTextRenderInfo AsyncTextLoader::RenderAutoScroll(AsyncTextParameters& param mTextModel->mVisualModel->mControlSize = Size(parameters.textWidth, parameters.textHeight); } - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::RenderAutoScroll natural size : %f, %f, control size : %f, %f \n", textNaturalSize.x, textNaturalSize.y, controlSize.x, controlSize.y); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("natural size : %f, %f, control size : %f, %f\n", textNaturalSize.x, textNaturalSize.y, controlSize.x, controlSize.y); + } +#endif // Calculate the actual gap before scrolling wraps. int textPadding = std::max(controlSize.x - textNaturalSize.x, 0.0f); @@ -1189,7 +1210,12 @@ AsyncTextRenderInfo AsyncTextLoader::RenderTextFit(AsyncTextParameters& paramete if(parameters.isTextFitArrayEnabled) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::RenderTextFit -> TextFitArray\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("AsyncTextLoader::RenderTextFit -> TextFitArray\n"); + } +#endif std::vector fitOptions = parameters.textFitArray; int numberOfFitOptions = static_cast(fitOptions.size()); @@ -1294,7 +1320,12 @@ AsyncTextRenderInfo AsyncTextLoader::RenderTextFit(AsyncTextParameters& paramete } else if(parameters.isTextFitEnabled) { - DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::RenderTextFit -> TextFit\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("AsyncTextLoader::RenderTextFit -> TextFit\n"); + } +#endif float minPointSize = parameters.textFitMinSize; float maxPointSize = parameters.textFitMaxSize; diff --git a/dali-toolkit/internal/text/async-text/async-text-manager-impl.cpp b/dali-toolkit/internal/text/async-text/async-text-manager-impl.cpp index 27e707d..0019d48 100644 --- a/dali-toolkit/internal/text/async-text/async-text-manager-impl.cpp +++ b/dali-toolkit/internal/text/async-text/async-text-manager-impl.cpp @@ -37,6 +37,8 @@ namespace const char* DALI_TEXT_NUMBER_OF_ASYNC_TEXT_LOADER("DALI_TEXT_NUMBER_OF_ASYNC_TEXT_LOADER"); const int DEFAULT_NUMBER_OF_LOADER = 4; const uint32_t EMPTY_TASK_ID = 0u; + +DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_ASYNC, false); } // namespace namespace Text @@ -56,6 +58,8 @@ AsyncTextManager::AsyncTextManager() auto numberOfLoaderString = Dali::EnvironmentVariable::GetEnvironmentVariable(DALI_TEXT_NUMBER_OF_ASYNC_TEXT_LOADER); int numberOfLoader = numberOfLoaderString ? std::atoi(numberOfLoaderString) : DEFAULT_NUMBER_OF_LOADER; + DALI_LOG_RELEASE_INFO("Number of async text loaders:%d\n", numberOfLoader); + for(int i = 0; i < numberOfLoader; i ++) { Text::AsyncTextLoader loader = Text::AsyncTextLoader::New(); @@ -149,7 +153,12 @@ uint32_t AsyncTextManager::RequestLoad(AsyncTextParameters& parameters, TextLoad if(observer) { - DALI_LOG_RELEASE_INFO("RequestLoad -> connect DestructionSignal to observer : %p, task : %u\n", observer, mTaskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RequestLoad -> connect DestructionSignal to observer : %p, task : %u\n", observer, mTaskId); + } +#endif observer->ConnectDestructionSignal(); observer->DestructionSignal().Connect(this, &AsyncTextManager::ObserverDestroyed); } @@ -162,13 +171,23 @@ uint32_t AsyncTextManager::RequestLoad(AsyncTextParameters& parameters, TextLoad // Loader move available list -> running list. Text::AsyncTextLoader loader = GetAvailableLoader(); task->SetLoader(loader); - DALI_LOG_RELEASE_INFO("RequestLoad -> ob : %p, add task : %u\n", element.mObserver, mTaskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RequestLoad -> ob : %p, add task : %u\n", element.mObserver, mTaskId); + } +#endif } else { // There is no available loader, add element to waiting queue. mWaitingTasks[mTaskId] = element; - DALI_LOG_RELEASE_INFO("RequestLoad -> ob : %p, add waiting task : %u\n", element.mObserver, mTaskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RequestLoad -> ob : %p, add waiting task : %u\n", element.mObserver, mTaskId); + } +#endif } Dali::AsyncTaskManager::Get().AddTask(task); @@ -183,7 +202,12 @@ void AsyncTextManager::RequestCancel(uint32_t taskId) { if(it->second.mObserver) { - DALI_LOG_RELEASE_INFO("RequestCancel -> ob : %p, remove wating task : %u\n", it->second.mObserver, taskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RequestCancel -> ob : %p, remove wating task : %u\n", it->second.mObserver, taskId); + } +#endif if(it->second.mObserver->DisconnectDestructionSignal()) { it->second.mObserver->DestructionSignal().Disconnect(this, &AsyncTextManager::ObserverDestroyed); @@ -200,7 +224,12 @@ void AsyncTextManager::RequestCancel(uint32_t taskId) { if(it->second.mObserver) { - DALI_LOG_RELEASE_INFO("RequestCancel -> ob : %p, remove running task : %u\n", it->second.mObserver, taskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RequestCancel -> ob : %p, remove running task : %u\n", it->second.mObserver, taskId); + } +#endif if(it->second.mObserver->DisconnectDestructionSignal()) { it->second.mObserver->DestructionSignal().Disconnect(this, &AsyncTextManager::ObserverDestroyed); @@ -230,7 +259,12 @@ void AsyncTextManager::LoadComplete(Toolkit::Internal::TextLoadingTaskPtr task) // Find task, execute load complete. if(it->second.mObserver) { - DALI_LOG_RELEASE_INFO("LoadComplete -> ob : %p, remove task : %u\n", it->second.mObserver, taskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("LoadComplete -> ob : %p, remove task : %u\n", it->second.mObserver, taskId); + } +#endif // TODO : If it fails for any reason, false should be sent. bool success = true; if(it->second.mObserver->DisconnectDestructionSignal()) @@ -241,14 +275,19 @@ void AsyncTextManager::LoadComplete(Toolkit::Internal::TextLoadingTaskPtr task) } else { - DALI_LOG_ERROR("LoadComplete -> observer destroyed -> remove task : %u\n", taskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("LoadComplete -> observer destroyed -> remove task : %u\n", taskId); + } +#endif } // If a task has completed, we souhld to remove the element from running map. mRunningTasks.erase(it); } else { - DALI_LOG_ERROR("LoadComplete -> Running task already removed! : %u\n", taskId); + DALI_LOG_WARNING("LoadComplete -> Running task already removed! : %u\n", taskId); } for(auto iter = mRunningLoaders.begin(); iter != mRunningLoaders.end(); ++iter) @@ -284,17 +323,31 @@ void AsyncTextManager::LoadComplete(Toolkit::Internal::TextLoadingTaskPtr task) // TODO : AsyncTaskManager does not know that the IsReady has changed after the task is added. // Wake up by adding an empty task to AsyncTaskManager. WakeUpAsyncTaskManager(); - DALI_LOG_RELEASE_INFO("LoadComplete task : %u -> new task -> ob : %p, add task : %u\n", taskId, element.mObserver, watingTaskId); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("LoadComplete task : %u -> new task -> ob : %p, add task : %u\n", taskId, element.mObserver, watingTaskId); + } +#endif } } - DALI_LOG_RELEASE_INFO("LoadComplete -> available loaders : %lu, running loaders : %lu, waiting tasks : %lu\n", mAvailableLoaders.size(), mRunningLoaders.size(), mWaitingTasks.size()); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("LoadComplete -> available loaders : %lu, running loaders : %lu, waiting tasks : %lu\n", mAvailableLoaders.size(), mRunningLoaders.size(), mWaitingTasks.size()); + } +#endif } void AsyncTextManager::ObserverDestroyed(TextLoadObserver* observer) { - DALI_LOG_RELEASE_INFO("-->AsyncTextManager::ObserverDestroyed observer : %p\n", observer); - +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("-->AsyncTextManager::ObserverDestroyed observer : %p\n", observer); + } +#endif for(auto it = mRunningTasks.begin(); it != mRunningTasks.end();) { if(it->second.mObserver == observer) diff --git a/dali-toolkit/internal/text/async-text/async-text-module-impl.cpp b/dali-toolkit/internal/text/async-text/async-text-module-impl.cpp index a2d7f50..e5b4edf 100644 --- a/dali-toolkit/internal/text/async-text/async-text-module-impl.cpp +++ b/dali-toolkit/internal/text/async-text/async-text-module-impl.cpp @@ -42,7 +42,6 @@ AsyncTextModule::AsyncTextModule() mHyphenation(), mMultilanguageSupport() { - DALI_LOG_RELEASE_INFO("-->AsyncTextModule::AsyncTextModule\n"); bool connnectLocaleChangedSignal = false; mBidirectionalSupport = TextAbstraction::BidirectionalSupport::New(); diff --git a/dali-toolkit/internal/text/async-text/text-loading-task.cpp b/dali-toolkit/internal/text/async-text/text-loading-task.cpp index c88c17e..9ada7d0 100644 --- a/dali-toolkit/internal/text/async-text/text-loading-task.cpp +++ b/dali-toolkit/internal/text/async-text/text-loading-task.cpp @@ -33,6 +33,7 @@ namespace Internal { namespace { +DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_ASYNC, false); } // namespace TextLoadingTask::TextLoadingTask(const uint32_t id, Text::AsyncTextParameters parameters, CallbackBase* callback) @@ -76,10 +77,8 @@ void TextLoadingTask::Process() { return; } - - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Process start\n"); + DALI_TRACE_SCOPE(gTraceFilter, "DALI_TEXT_ASYNC_LOADING_TASK_PROCESS"); Load(); - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Process end\n"); } bool TextLoadingTask::IsReady() @@ -97,17 +96,32 @@ void TextLoadingTask::Load() { if(mParameters.isAutoScrollEnabled && !mParameters.isMultiLine) { - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Load RenderAutoScroll\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RenderAutoScroll\n"); + } +#endif mRenderInfo = mLoader.RenderAutoScroll(mParameters); } else if(mParameters.isTextFitEnabled || mParameters.isTextFitArrayEnabled) { - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Load RenderTextFit\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RenderTextFit\n"); + } +#endif mRenderInfo = mLoader.RenderTextFit(mParameters); } else { - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Load RenderText\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("RenderText\n"); + } +#endif mRenderInfo = mLoader.RenderText(mParameters); } } @@ -115,14 +129,24 @@ void TextLoadingTask::Load() case Text::Async::COMPUTE_NATURAL_SIZE: { - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Load GetNaturalSize\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("GetNaturalSize\n"); + } +#endif mRenderInfo = mLoader.GetNaturalSize(mParameters); } break; case Text::Async::COMPUTE_HEIGHT_FOR_WIDTH: { - DALI_LOG_RELEASE_INFO("-->TextLoadingTask::Load GetHeightForWidth\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter && gTraceFilter->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("GetHeightForWidth\n"); + } +#endif mRenderInfo = mLoader.GetHeightForWidth(mParameters); } break; diff --git a/dali-toolkit/internal/visuals/text/text-visual.cpp b/dali-toolkit/internal/visuals/text/text-visual.cpp index 8ca9e54..dda68c2 100644 --- a/dali-toolkit/internal/visuals/text/text-visual.cpp +++ b/dali-toolkit/internal/visuals/text/text-visual.cpp @@ -54,6 +54,7 @@ namespace Internal namespace { DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_PERFORMANCE_MARKER, false); +DALI_INIT_TRACE_FILTER(gTraceFilter2, DALI_TRACE_TEXT_ASYNC, false); const int CUSTOM_PROPERTY_COUNT(3); // uTextColorAnimatable, uHasMultipleTextColors, requireRender @@ -389,7 +390,6 @@ void TextVisual::DoSetOffScene(Actor& actor) { if(mController->GetRenderMode() != DevelTextLabel::Render::SYNC && mIsRenderTaskRunning) { - DALI_LOG_RELEASE_INFO("-->TextVisual::DoSetOffScene RequestCancel:%u\n", mRenderTaskId); Text::AsyncTextManager::Get().RequestCancel(mRenderTaskId); mIsRenderTaskRunning = false; } @@ -517,7 +517,6 @@ void TextVisual::UpdateRenderer() { if(mController->GetRenderMode() != DevelTextLabel::Render::SYNC) { - DALI_LOG_RELEASE_INFO("-->TextVisual::UpdateRenderer return; AsyncTextLoad processing\n"); return; } @@ -718,10 +717,15 @@ void TextVisual::CreateTextureSet(TilingInfo& info, VisualRenderer& renderer, Sa // From async text manager void TextVisual::LoadComplete(bool loadingSuccess, TextInformation textInformation) { - DALI_LOG_RELEASE_INFO("-->TextVisual::LoadComplete\n"); - Text::AsyncTextParameters parameters = textInformation.parameters; +#ifdef TRACE_ENABLED + if(gTraceFilter2 && gTraceFilter2->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("LoadComplete, success:%d, type:%d\n", loadingSuccess, parameters.requestType); + } +#endif + switch (parameters.requestType) { case Text::Async::RENDER_FIXED_SIZE: @@ -1017,7 +1021,12 @@ void TextVisual::SetAsyncTextInterface(Text::AsyncTextInterface* asyncTextInterf void TextVisual::RequestAsyncSizeComputation(Text::AsyncTextParameters& parameters) { - DALI_LOG_RELEASE_INFO("-->TextVisual::RequestAsyncSizeComputation RequestLoad\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter2 && gTraceFilter2->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("Request size computation, type:%d\n", parameters.requestType); + } +#endif switch (parameters.requestType) { @@ -1092,7 +1101,12 @@ bool TextVisual::UpdateAsyncRenderer(Text::AsyncTextParameters& parameters) Text::AsyncTextManager::Get().RequestCancel(mRenderTaskId); } - DALI_LOG_RELEASE_INFO("-->TextVisual::UpdateAsyncRenderer RequestLoad\n"); +#ifdef TRACE_ENABLED + if(gTraceFilter2 && gTraceFilter2->IsTraceEnabled()) + { + DALI_LOG_RELEASE_INFO("Request render, type:%d\n", parameters.requestType); + } +#endif mIsRenderTaskRunning = true; TextLoadObserver* textLoadObserver = this;