2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h>
22 #include <dali/devel-api/adaptor-framework/window-devel.h>
23 #include <dali/devel-api/common/stage.h>
24 #include <dali/devel-api/rendering/renderer-devel.h>
25 #include <dali/integration-api/debug.h>
28 #include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-signals-devel.h>
29 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
30 #include <dali-toolkit/devel-api/visuals/visual-actions-devel.h>
31 #include <dali-toolkit/internal/visuals/animated-vector-image/vector-animation-manager.h>
32 #include <dali-toolkit/internal/visuals/image-visual-shader-factory.h>
33 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
34 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
35 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
36 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>
37 #include <dali-toolkit/public-api/visuals/visual-properties.h>
47 const int CUSTOM_PROPERTY_COUNT(6); // 5 transform properties + pixel area,
49 const Dali::Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
52 DALI_ENUM_TO_STRING_TABLE_BEGIN(STOP_BEHAVIOR)
53 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::StopBehavior, CURRENT_FRAME)
54 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::StopBehavior, FIRST_FRAME)
55 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::StopBehavior, LAST_FRAME)
56 DALI_ENUM_TO_STRING_TABLE_END(STOP_BEHAVIOR)
59 DALI_ENUM_TO_STRING_TABLE_BEGIN(LOOPING_MODE)
60 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::LoopingMode, RESTART)
61 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::LoopingMode, AUTO_REVERSE)
62 DALI_ENUM_TO_STRING_TABLE_END(LOOPING_MODE)
64 #if defined(DEBUG_ENABLED)
65 Debug::Filter* gVectorAnimationLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VECTOR_ANIMATION");
68 } // unnamed namespace
70 AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties)
72 AnimatedVectorImageVisualPtr visual(new AnimatedVectorImageVisual(factoryCache, shaderFactory, imageUrl));
73 visual->SetProperties(properties);
78 AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl)
80 AnimatedVectorImageVisualPtr visual(new AnimatedVectorImageVisual(factoryCache, shaderFactory, imageUrl));
85 AnimatedVectorImageVisual::AnimatedVectorImageVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl)
86 : Visual::Base(factoryCache, Visual::FittingMode::FILL, static_cast<Toolkit::Visual::Type>(Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE)),
89 mVectorAnimationTask(new VectorAnimationTask(factoryCache)),
90 mImageVisualShaderFactory(shaderFactory),
92 mVisualScale(Vector2::ONE),
94 mPlayState(DevelImageVisual::PlayState::STOPPED),
95 mEventCallback(nullptr),
97 mRendererAdded(false),
99 mRedrawInScalingDown(true)
101 // the rasterized image is with pre-multiplied alpha format
102 mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
104 if(!mVectorAnimationTask->Load(mUrl.GetUrl()))
109 mVectorAnimationTask->UploadCompletedSignal().Connect(this, &AnimatedVectorImageVisual::OnUploadCompleted);
110 mVectorAnimationTask->SetAnimationFinishedCallback(new EventThreadCallback(MakeCallback(this, &AnimatedVectorImageVisual::OnAnimationFinished)));
112 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
113 vectorAnimationManager.AddObserver(*this);
116 AnimatedVectorImageVisual::~AnimatedVectorImageVisual()
120 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
121 vectorAnimationManager.RemoveObserver(*this);
125 mFactoryCache.GetVectorAnimationManager().UnregisterEventCallback(mEventCallback);
128 // Finalize animation task and disconnect the signal in the main thread
129 mVectorAnimationTask->UploadCompletedSignal().Disconnect(this, &AnimatedVectorImageVisual::OnUploadCompleted);
130 mVectorAnimationTask->Finalize();
134 void AnimatedVectorImageVisual::VectorAnimationManagerDestroyed()
136 // Core is shutting down. Don't talk to the plugin any more.
137 mCoreShutdown = true;
140 void AnimatedVectorImageVisual::GetNaturalSize(Vector2& naturalSize)
142 if(mVisualSize != Vector2::ZERO)
144 naturalSize = mVisualSize;
148 uint32_t width, height;
149 mVectorAnimationTask->GetDefaultSize(width, height);
150 naturalSize.x = width;
151 naturalSize.y = height;
154 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::GetNaturalSize: w = %f, h = %f [%p]\n", naturalSize.width, naturalSize.height, this);
157 void AnimatedVectorImageVisual::DoCreatePropertyMap(Property::Map& map) const
160 map.Insert(Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE);
163 map.Insert(Toolkit::ImageVisual::Property::URL, mUrl.GetUrl());
165 map.Insert(Toolkit::DevelImageVisual::Property::LOOP_COUNT, mAnimationData.loopCount);
167 uint32_t startFrame, endFrame;
168 mVectorAnimationTask->GetPlayRange(startFrame, endFrame);
170 Property::Array playRange;
171 playRange.PushBack(static_cast<int32_t>(startFrame));
172 playRange.PushBack(static_cast<int32_t>(endFrame));
173 map.Insert(Toolkit::DevelImageVisual::Property::PLAY_RANGE, playRange);
175 map.Insert(Toolkit::DevelImageVisual::Property::PLAY_STATE, static_cast<int32_t>(mPlayState));
176 map.Insert(Toolkit::DevelImageVisual::Property::CURRENT_FRAME_NUMBER, static_cast<int32_t>(mVectorAnimationTask->GetCurrentFrameNumber()));
177 map.Insert(Toolkit::DevelImageVisual::Property::TOTAL_FRAME_NUMBER, static_cast<int32_t>(mVectorAnimationTask->GetTotalFrameNumber()));
179 map.Insert(Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, mAnimationData.stopBehavior);
180 map.Insert(Toolkit::DevelImageVisual::Property::LOOPING_MODE, mAnimationData.loopingMode);
181 map.Insert(Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, mRedrawInScalingDown);
183 Property::Map layerInfo;
184 mVectorAnimationTask->GetLayerInfo(layerInfo);
185 map.Insert(Toolkit::DevelImageVisual::Property::CONTENT_INFO, layerInfo);
188 void AnimatedVectorImageVisual::DoCreateInstancePropertyMap(Property::Map& map) const
193 void AnimatedVectorImageVisual::DoSetProperties(const Property::Map& propertyMap)
195 // url already passed in from constructor
196 for(Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter)
198 KeyValuePair keyValue = propertyMap.GetKeyValue(iter);
199 if(keyValue.first.type == Property::Key::INDEX)
201 DoSetProperty(keyValue.first.indexKey, keyValue.second);
205 if(keyValue.first == LOOP_COUNT_NAME)
207 DoSetProperty(Toolkit::DevelImageVisual::Property::LOOP_COUNT, keyValue.second);
209 else if(keyValue.first == PLAY_RANGE_NAME)
211 DoSetProperty(Toolkit::DevelImageVisual::Property::PLAY_RANGE, keyValue.second);
213 else if(keyValue.first == STOP_BEHAVIOR_NAME)
215 DoSetProperty(Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, keyValue.second);
217 else if(keyValue.first == LOOPING_MODE_NAME)
219 DoSetProperty(Toolkit::DevelImageVisual::Property::LOOPING_MODE, keyValue.second);
221 else if(keyValue.first == REDRAW_IN_SCALING_DOWN_NAME)
223 DoSetProperty(Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, keyValue.second);
228 TriggerVectorRasterization();
231 void AnimatedVectorImageVisual::DoSetProperty(Property::Index index, const Property::Value& value)
235 case Toolkit::DevelImageVisual::Property::LOOP_COUNT:
238 if(value.Get(loopCount))
240 mAnimationData.loopCount = loopCount;
241 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_LOOP_COUNT;
245 case Toolkit::DevelImageVisual::Property::PLAY_RANGE:
247 const Property::Array* array = value.GetArray();
250 mAnimationData.playRange = *array;
251 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_RANGE;
255 case Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR:
257 int32_t stopBehavior = mAnimationData.stopBehavior;
258 if(Scripting::GetEnumerationProperty(value, STOP_BEHAVIOR_TABLE, STOP_BEHAVIOR_TABLE_COUNT, stopBehavior))
260 mAnimationData.stopBehavior = DevelImageVisual::StopBehavior::Type(stopBehavior);
261 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_STOP_BEHAVIOR;
265 case Toolkit::DevelImageVisual::Property::LOOPING_MODE:
267 int32_t loopingMode = mAnimationData.loopingMode;
268 if(Scripting::GetEnumerationProperty(value, LOOPING_MODE_TABLE, LOOPING_MODE_TABLE_COUNT, loopingMode))
270 mAnimationData.loopingMode = DevelImageVisual::LoopingMode::Type(loopingMode);
271 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_LOOPING_MODE;
275 case Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN:
278 if(value.Get(redraw))
280 mRedrawInScalingDown = redraw;
287 void AnimatedVectorImageVisual::OnInitialize(void)
289 Shader shader = GenerateShader();
291 Geometry geometry = mFactoryCache.GetGeometry(VisualFactoryCache::QUAD_GEOMETRY);
293 mImpl->mRenderer = VisualRenderer::New(geometry, shader);
294 mImpl->mRenderer.ReserveCustomProperties(CUSTOM_PROPERTY_COUNT);
296 TextureSet textureSet = TextureSet::New();
297 mImpl->mRenderer.SetTextures(textureSet);
299 // Register transform properties
300 mImpl->mTransform.SetUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
303 void AnimatedVectorImageVisual::DoSetOnScene(Actor& actor)
305 // Defer the rasterisation task until we get given a size (by Size Negotiation algorithm)
307 // Hold the weak handle of the placement actor and delay the adding of renderer until the rasterization is finished.
308 mPlacementActor = actor;
312 Vector2 imageSize = Vector2::ZERO;
313 imageSize = actor.GetProperty(Actor::Property::SIZE).Get<Vector2>();
314 mFactoryCache.UpdateBrokenImageRenderer(mImpl->mRenderer, imageSize);
315 actor.AddRenderer(mImpl->mRenderer);
316 ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
320 mVectorAnimationTask->SetRenderer(mImpl->mRenderer);
322 // Add property notification for scaling & size
323 mScaleNotification = actor.AddPropertyNotification(Actor::Property::WORLD_SCALE, StepCondition(0.1f, 1.0f));
324 mScaleNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnScaleNotification);
326 mSizeNotification = actor.AddPropertyNotification(Actor::Property::SIZE, StepCondition(3.0f));
327 mSizeNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnSizeNotification);
329 DevelActor::VisibilityChangedSignal(actor).Connect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
331 Window window = DevelWindow::Get(actor);
334 DevelWindow::VisibilityChangedSignal(window).Connect(this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged);
338 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnScene [%p]\n", this);
341 void AnimatedVectorImageVisual::DoSetOffScene(Actor& actor)
348 actor.RemoveRenderer(mImpl->mRenderer);
349 mRendererAdded = false;
352 // Remove property notification
353 actor.RemovePropertyNotification(mScaleNotification);
354 actor.RemovePropertyNotification(mSizeNotification);
356 DevelActor::VisibilityChangedSignal(actor).Disconnect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
358 Window window = DevelWindow::Get(actor);
361 DevelWindow::VisibilityChangedSignal(window).Disconnect(this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged);
364 mPlacementActor.Reset();
366 // Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
367 mVisualSize = Vector2::ZERO;
368 mVisualScale = Vector2::ONE;
370 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOffScene [%p]\n", this);
373 void AnimatedVectorImageVisual::OnSetTransform()
375 Vector2 visualSize = mImpl->mTransform.GetVisualSize(mImpl->mControlSize);
377 if(IsOnScene() && visualSize != mVisualSize)
379 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: width = %f, height = %f [%p]\n", visualSize.width, visualSize.height, this);
381 mVisualSize = visualSize;
383 SetVectorImageSize();
385 if(mPlayState == DevelImageVisual::PlayState::PLAYING && mAnimationData.playState != DevelImageVisual::PlayState::PLAYING)
387 mAnimationData.playState = DevelImageVisual::PlayState::PLAYING;
388 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
395 void AnimatedVectorImageVisual::UpdateShader()
399 Shader shader = GenerateShader();
400 mImpl->mRenderer.SetShader(shader);
404 void AnimatedVectorImageVisual::OnDoAction(const Property::Index actionId, const Property::Value& attributes)
406 // Check if action is valid for this visual type and perform action if possible
409 case DevelAnimatedVectorImageVisual::Action::PLAY:
411 if(IsOnScene() && mVisualSize != Vector2::ZERO)
413 if(mAnimationData.playState != DevelImageVisual::PlayState::PLAYING)
415 mAnimationData.playState = DevelImageVisual::PlayState::PLAYING;
416 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
419 mPlayState = DevelImageVisual::PlayState::PLAYING;
422 case DevelAnimatedVectorImageVisual::Action::PAUSE:
424 if(mAnimationData.playState == DevelImageVisual::PlayState::PLAYING)
426 mAnimationData.playState = DevelImageVisual::PlayState::PAUSED;
427 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
429 mPlayState = DevelImageVisual::PlayState::PAUSED;
432 case DevelAnimatedVectorImageVisual::Action::STOP:
434 if(mAnimationData.playState != DevelImageVisual::PlayState::STOPPED)
436 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
437 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
439 mPlayState = DevelImageVisual::PlayState::STOPPED;
442 case DevelAnimatedVectorImageVisual::Action::JUMP_TO:
445 if(attributes.Get(frameNumber))
447 mAnimationData.currentFrame = frameNumber;
448 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_CURRENT_FRAME;
454 TriggerVectorRasterization();
457 void AnimatedVectorImageVisual::OnUploadCompleted()
459 // If weak handle is holding a placement actor, it is the time to add the renderer to actor.
460 Actor actor = mPlacementActor.GetHandle();
461 if(actor && !mRendererAdded)
463 actor.AddRenderer(mImpl->mRenderer);
464 mRendererAdded = true;
466 ResourceReady(Toolkit::Visual::ResourceStatus::READY);
468 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnUploadCompleted: Renderer is added [%p]\n", this);
472 void AnimatedVectorImageVisual::OnAnimationFinished()
474 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnAnimationFinished: action state = %d [%p]\n", mPlayState, this);
476 if(mPlayState != DevelImageVisual::PlayState::STOPPED)
478 mPlayState = DevelImageVisual::PlayState::STOPPED;
480 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
482 if(mImpl->mEventObserver)
484 mImpl->mEventObserver->NotifyVisualEvent(*this, DevelAnimatedVectorImageVisual::Signal::ANIMATION_FINISHED);
490 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED);
494 void AnimatedVectorImageVisual::SendAnimationData()
496 if(mAnimationData.resendFlag)
498 mVectorAnimationTask->SetAnimationData(mAnimationData);
502 if(mAnimationData.playState == DevelImageVisual::PlayState::PLAYING)
504 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY);
508 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED);
512 mAnimationData.resendFlag = 0;
516 void AnimatedVectorImageVisual::SetVectorImageSize()
518 uint32_t width = static_cast<uint32_t>(mVisualSize.width * mVisualScale.width);
519 uint32_t height = static_cast<uint32_t>(mVisualSize.height * mVisualScale.height);
521 mAnimationData.width = width;
522 mAnimationData.height = height;
523 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_SIZE;
526 void AnimatedVectorImageVisual::StopAnimation()
528 if(mAnimationData.playState != DevelImageVisual::PlayState::STOPPED)
530 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
531 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
533 mPlayState = DevelImageVisual::PlayState::STOPPED;
537 void AnimatedVectorImageVisual::TriggerVectorRasterization()
539 if(!mEventCallback && !mCoreShutdown)
541 mEventCallback = MakeCallback(this, &AnimatedVectorImageVisual::OnProcessEvents);
542 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
543 vectorAnimationManager.RegisterEventCallback(mEventCallback);
544 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
548 void AnimatedVectorImageVisual::OnScaleNotification(PropertyNotification& source)
550 Actor actor = mPlacementActor.GetHandle();
553 Vector3 scale = actor.GetProperty<Vector3>(Actor::Property::WORLD_SCALE);
555 if(mRedrawInScalingDown || scale.width >= 1.0f || scale.height >= 1.0f)
557 mVisualScale.width = scale.width;
558 mVisualScale.height = scale.height;
560 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnScaleNotification: scale = %f, %f [%p]\n", mVisualScale.width, mVisualScale.height, this);
562 SetVectorImageSize();
565 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
570 void AnimatedVectorImageVisual::OnSizeNotification(PropertyNotification& source)
572 Actor actor = mPlacementActor.GetHandle();
575 Vector3 size = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE);
576 mVisualSize.width = size.width;
577 mVisualSize.height = size.height;
579 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSizeNotification: size = %f, %f [%p]\n", mVisualSize.width, mVisualSize.height, this);
581 SetVectorImageSize();
584 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
588 void AnimatedVectorImageVisual::OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type)
593 TriggerVectorRasterization();
595 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this);
599 void AnimatedVectorImageVisual::OnWindowVisibilityChanged(Window window, bool visible)
604 TriggerVectorRasterization();
606 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this);
610 void AnimatedVectorImageVisual::OnProcessEvents()
614 mEventCallback = nullptr; // The callback will be deleted in the VectorAnimationManager
617 Shader AnimatedVectorImageVisual::GenerateShader() const
620 if(mImpl->mCustomShader)
622 shader = Shader::New(mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource().data() : mImpl->mCustomShader->mVertexShader,
623 mImpl->mCustomShader->mFragmentShader.empty() ? mImageVisualShaderFactory.GetFragmentShaderSource().data() : mImpl->mCustomShader->mFragmentShader,
624 mImpl->mCustomShader->mHints);
626 shader.RegisterProperty(PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT);
630 shader = mImageVisualShaderFactory.GetShader(
632 ImageVisualShaderFeature::FeatureBuilder()
633 .EnableRoundedCorner(IsRoundedCornerRequired())
634 .EnableBorderline(IsBorderlineRequired()));
639 } // namespace Internal
641 } // namespace Toolkit