#include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
#include <dali/devel-api/adaptor-framework/key-devel.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/cursor-helper-functions.h>
#include <dali-toolkit/internal/text/controller/text-controller-impl.h>
#include <dali-toolkit/internal/text/controller/text-controller-placeholder-handler.h>
#include <dali-toolkit/internal/text/controller/text-controller-text-updater.h>
+#include <dali-toolkit/internal/text/cursor-helper-functions.h>
#include <dali-toolkit/internal/text/text-editable-control-interface.h>
namespace
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS");
#endif
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
const std::string KEY_C_NAME = "c";
const std::string KEY_V_NAME = "v";
const std::string KEY_X_NAME = "x";
return;
}
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_MODIFY_EVENTS");
+
for(Vector<ModifyEvent>::ConstIterator it = events.Begin(),
endIt = events.End();
it != endIt;
// DISCARD temporary text
events.Clear();
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_MODIFY_EVENTS");
}
void Controller::EventHandler::TextReplacedEvent(Controller& controller)
case InputMethodContext::SELECTION_SET:
{
uint32_t start = static_cast<uint32_t>(inputMethodContextEvent.startIndex);
- uint32_t end = static_cast<uint32_t>(inputMethodContextEvent.endIndex);
+ uint32_t end = static_cast<uint32_t>(inputMethodContextEvent.endIndex);
if(start == end)
{
controller.SetPrimaryCursorPosition(start, true);
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/math/math-utils.h>
// INTERNAL INCLUDES
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_BEGIN(gTraceFilter, "DALI_TEXT_MODEL_UPDATE");
Vector<Character>& srcCharacters = impl.mModel->mLogicalModel->mText;
Vector<Character> displayCharacters;
// 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;
}
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/math/math-utils.h>
#include <limits>
Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_TEXT_CONTROLS");
#endif
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
constexpr float MAX_FLOAT = std::numeric_limits<float>::max();
float ConvertToEven(float value)
Vector3 Controller::Relayouter::GetNaturalSize(Controller& controller)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->Controller::GetNaturalSize\n");
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_GET_NATURAL_SIZE");
Vector3 naturalSizeVec3;
// Make sure the model is up-to-date before layouting
naturalSizeVec3.x = ConvertToEven(naturalSizeVec3.x);
naturalSizeVec3.y = ConvertToEven(naturalSizeVec3.y);
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_GET_NATURAL_SIZE");
+
return naturalSizeVec3;
}
const OperationsMask operations = impl.mOperationsPending;
if(NO_OPERATION != (UPDATE_LAYOUT_SIZE & operations) || impl.mTextFitContentSize != layoutSize)
{
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_FIT_LAYOUT");
ModelPtr& model = impl.mModel;
bool actualellipsis = model->mElideEnabled;
impl.mFontDefaults->mFitPointSize = bestPointSize;
impl.mFontDefaults->sizeDefined = true;
impl.ClearFontData();
+
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_FIT_LAYOUT");
}
}
float Controller::Relayouter::GetHeightForWidth(Controller& controller, float width)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->Controller::GetHeightForWidth %p width %f\n", &controller, width);
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_GET_HEIGHT_FOR_WIDTH");
// Make sure the model is up-to-date before layouting
EventHandler::ProcessModifyEvents(controller);
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::GetHeightForWidth cached %f\n", layoutSize.height);
}
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_GET_HEIGHT_FOR_WIDTH");
+
return layoutSize.height;
}
TextUpdateInfo& textUpdateInfo = impl.mTextUpdateInfo;
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->Controller::Relayout %p size %f,%f, autoScroll[%s]\n", &controller, size.width, size.height, impl.mIsAutoScrollEnabled ? "true" : "false");
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_RELAYOUT");
UpdateTextType updateTextType = NONE_UPDATED;
// Not worth to relayout if width or height is equal to zero.
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::Relayout (skipped)\n");
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_RELAYOUT");
return updateTextType;
}
// Clear the update info. This info will be set the next time the text is updated.
textUpdateInfo.Clear();
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::Relayout\n");
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_RELAYOUT");
return updateTextType;
}
bool Controller::Relayouter::DoRelayout(Controller::Impl& impl, const Size& size, OperationsMask operationsRequired, Size& layoutSize)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->Controller::Relayouter::DoRelayout %p size %f,%f\n", &impl, size.width, size.height);
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_DORELAYOUT");
bool viewUpdated(false);
// Calculate the operations to be done.
DALI_LOG_ERROR("Current text is: %s\n", currentText.c_str());
DALI_LOG_ERROR("startIndex: %u, lastIndex: %u, requestedNumberOfCharacters: %u, charactersToGlyph.Count = %lu, glyphsPerCharacter.Count = %lu\n", startIndex, lastIndex, requestedNumberOfCharacters, charactersToGlyph.Count(), glyphsPerCharacter.Count());
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_DORELAYOUT");
+
return false;
}
// Nothing else to do if there is no glyphs.
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::DoRelayout no glyphs, view updated true\n");
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_DORELAYOUT");
return true;
}
DALI_LOG_INFO(gLogFilter, Debug::Concise, "Controller::Relayouter::DoRelayout [%p] mImpl->mIsTextDirectionRTL[%s] [%s]\n", &impl, (impl.mIsTextDirectionRTL) ? "true" : "false", currentText.c_str());
#endif
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "<--Controller::Relayouter::DoRelayout, view updated %s\n", (viewUpdated ? "true" : "false"));
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_DORELAYOUT");
return viewUpdated;
}
// EXTERNAL INCLUDES
#include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/common/constants.h>
#include <dali/public-api/math/math-utils.h>
#include <memory.h>
{
namespace
{
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
const float HALF(0.5f);
const float ONE_AND_A_HALF(1.5f);
PixelData Typesetter::Render(const Vector2& size, Toolkit::DevelText::TextDirection::Type textDirection, RenderBehaviour behaviour, bool ignoreHorizontalAlignment, Pixel::Format pixelFormat)
{
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_RENDERING_TYPESETTER");
// @todo. This initial implementation for a TextLabel has only one visible page.
// Elides the text if needed.
// Create the final PixelData for the combined image buffer
PixelData pixelData = Devel::PixelBuffer::Convert(imageBuffer);
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_RENDERING_TYPESETTER");
+
return pixelData;
}
#include <dali/devel-api/rendering/texture-devel.h>
#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
#include <string.h>
// INTERNAL HEADER
{
namespace
{
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
+
const int CUSTOM_PROPERTY_COUNT(5); // anim,premul,size,offset,multicol
const Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
Shader shader = GetTextShader(mFactoryCache, TextVisualShaderFeature::FeatureBuilder().EnableMultiColor(hasMultipleTextColors).EnableEmoji(containsColorGlyph).EnableStyle(styleEnabled).EnableOverlay(isOverlayStyle));
mImpl->mRenderer.SetShader(shader);
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_TEXT_VISUAL_UPDATE_RENDERER");
+
// Get the maximum size.
const int maxTextureSize = Dali::GetMaxTextureSize();
}
}
}
+
+ DALI_TRACE_END(gTraceFilter, "DALI_TEXT_VISUAL_UPDATE_RENDERER");
}
TextureSet TextVisual::GetTextTexture(const Vector2& size)