{
DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_TEXT_PERFORMANCE_MARKER, false);
-const int CUSTOM_PROPERTY_COUNT(5); // anim,premul,size,offset,multicol
+const int CUSTOM_PROPERTY_COUNT(2); // uTextColorAnimatable, uHasMultipleTextColors
/**
* Return Property index for the given string key
mTypesetter(Text::Typesetter::New(mController->GetTextModel())),
mTextVisualShaderFactory(shaderFactory),
mTextShaderFeatureCache(),
+ mHasMultipleTextColorsIndex(Property::INVALID_INDEX),
mAnimatableTextColorPropertyIndex(Property::INVALID_INDEX),
mTextColorAnimatableIndex(Property::INVALID_INDEX),
mRendererUpdateNeeded(false)
mImpl->mRenderer = VisualRenderer::New(geometry, shader);
mImpl->mRenderer.ReserveCustomProperties(CUSTOM_PROPERTY_COUNT);
+ mHasMultipleTextColorsIndex = mImpl->mRenderer.RegisterUniqueProperty("uHasMultipleTextColors", static_cast<float>(false));
}
void TextVisual::DoSetProperties(const Property::Map& propertyMap)
// Enable the pre-multiplied alpha to improve the text quality
renderer.SetProperty(Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, true);
- renderer.RegisterProperty(PREMULTIPLIED_ALPHA, 1.0f);
+ renderer.SetProperty(VisualRenderer::Property::VISUAL_PRE_MULTIPLIED_ALPHA, true);
// Set size and offset for the tiling.
renderer.SetProperty(VisualRenderer::Property::TRANSFORM_SIZE, Vector2(info.width, info.height));
mImpl->mRenderer.SetTextures(textureSet);
//Register transform properties
mImpl->mTransform.SetUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
- mImpl->mRenderer.RegisterProperty("uHasMultipleTextColors", static_cast<float>(hasMultipleTextColors));
+ mImpl->mRenderer.SetProperty(mHasMultipleTextColorsIndex, static_cast<float>(hasMultipleTextColors));
mImpl->mRenderer.SetProperty(Renderer::Property::BLEND_MODE, BlendMode::ON);
mRendererList.push_back(mImpl->mRenderer);