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 |= Visual::Base::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::EnablePreMultipliedAlpha(bool preMultiplied)
195 // Make always enable pre multiplied alpha whether preMultiplied value is false.
198 DALI_LOG_WARNING("Note : AnimatedVectorVisual cannot disable PreMultipliedAlpha\n");
202 void AnimatedVectorImageVisual::DoSetProperties(const Property::Map& propertyMap)
204 // url already passed in from constructor
205 for(Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter)
207 KeyValuePair keyValue = propertyMap.GetKeyValue(iter);
208 if(keyValue.first.type == Property::Key::INDEX)
210 DoSetProperty(keyValue.first.indexKey, keyValue.second);
214 if(keyValue.first == LOOP_COUNT_NAME)
216 DoSetProperty(Toolkit::DevelImageVisual::Property::LOOP_COUNT, keyValue.second);
218 else if(keyValue.first == PLAY_RANGE_NAME)
220 DoSetProperty(Toolkit::DevelImageVisual::Property::PLAY_RANGE, keyValue.second);
222 else if(keyValue.first == STOP_BEHAVIOR_NAME)
224 DoSetProperty(Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, keyValue.second);
226 else if(keyValue.first == LOOPING_MODE_NAME)
228 DoSetProperty(Toolkit::DevelImageVisual::Property::LOOPING_MODE, keyValue.second);
230 else if(keyValue.first == REDRAW_IN_SCALING_DOWN_NAME)
232 DoSetProperty(Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, keyValue.second);
237 TriggerVectorRasterization();
240 void AnimatedVectorImageVisual::DoSetProperty(Property::Index index, const Property::Value& value)
244 case Toolkit::DevelImageVisual::Property::LOOP_COUNT:
247 if(value.Get(loopCount))
249 mAnimationData.loopCount = loopCount;
250 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_LOOP_COUNT;
254 case Toolkit::DevelImageVisual::Property::PLAY_RANGE:
256 const Property::Array* array = value.GetArray();
259 mAnimationData.playRange = *array;
260 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_RANGE;
264 case Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR:
266 int32_t stopBehavior = mAnimationData.stopBehavior;
267 if(Scripting::GetEnumerationProperty(value, STOP_BEHAVIOR_TABLE, STOP_BEHAVIOR_TABLE_COUNT, stopBehavior))
269 mAnimationData.stopBehavior = DevelImageVisual::StopBehavior::Type(stopBehavior);
270 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_STOP_BEHAVIOR;
274 case Toolkit::DevelImageVisual::Property::LOOPING_MODE:
276 int32_t loopingMode = mAnimationData.loopingMode;
277 if(Scripting::GetEnumerationProperty(value, LOOPING_MODE_TABLE, LOOPING_MODE_TABLE_COUNT, loopingMode))
279 mAnimationData.loopingMode = DevelImageVisual::LoopingMode::Type(loopingMode);
280 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_LOOPING_MODE;
284 case Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN:
287 if(value.Get(redraw))
289 mRedrawInScalingDown = redraw;
296 void AnimatedVectorImageVisual::OnInitialize(void)
298 Shader shader = GenerateShader();
300 Geometry geometry = mFactoryCache.GetGeometry(VisualFactoryCache::QUAD_GEOMETRY);
302 mImpl->mRenderer = VisualRenderer::New(geometry, shader);
303 mImpl->mRenderer.ReserveCustomProperties(CUSTOM_PROPERTY_COUNT);
305 TextureSet textureSet = TextureSet::New();
306 mImpl->mRenderer.SetTextures(textureSet);
308 // Register transform properties
309 mImpl->mTransform.SetUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
312 void AnimatedVectorImageVisual::DoSetOnScene(Actor& actor)
314 // Defer the rasterisation task until we get given a size (by Size Negotiation algorithm)
316 // Hold the weak handle of the placement actor and delay the adding of renderer until the rasterization is finished.
317 mPlacementActor = actor;
321 Vector2 imageSize = Vector2::ZERO;
322 imageSize = actor.GetProperty(Actor::Property::SIZE).Get<Vector2>();
323 mFactoryCache.UpdateBrokenImageRenderer(mImpl->mRenderer, imageSize);
324 actor.AddRenderer(mImpl->mRenderer);
325 ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
329 mVectorAnimationTask->SetRenderer(mImpl->mRenderer);
331 // Add property notification for scaling & size
332 mScaleNotification = actor.AddPropertyNotification(Actor::Property::WORLD_SCALE, StepCondition(0.1f, 1.0f));
333 mScaleNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnScaleNotification);
335 mSizeNotification = actor.AddPropertyNotification(Actor::Property::SIZE, StepCondition(3.0f));
336 mSizeNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnSizeNotification);
338 DevelActor::VisibilityChangedSignal(actor).Connect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
340 Window window = DevelWindow::Get(actor);
343 DevelWindow::VisibilityChangedSignal(window).Connect(this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged);
347 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnScene [%p]\n", this);
350 void AnimatedVectorImageVisual::DoSetOffScene(Actor& actor)
357 actor.RemoveRenderer(mImpl->mRenderer);
358 mRendererAdded = false;
361 // Remove property notification
362 actor.RemovePropertyNotification(mScaleNotification);
363 actor.RemovePropertyNotification(mSizeNotification);
365 DevelActor::VisibilityChangedSignal(actor).Disconnect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
367 Window window = DevelWindow::Get(actor);
370 DevelWindow::VisibilityChangedSignal(window).Disconnect(this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged);
373 mPlacementActor.Reset();
375 // Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
376 mVisualSize = Vector2::ZERO;
377 mVisualScale = Vector2::ONE;
379 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOffScene [%p]\n", this);
382 void AnimatedVectorImageVisual::OnSetTransform()
384 Vector2 visualSize = mImpl->mTransform.GetVisualSize(mImpl->mControlSize);
386 if(IsOnScene() && visualSize != mVisualSize)
388 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: width = %f, height = %f [%p]\n", visualSize.width, visualSize.height, this);
390 mVisualSize = visualSize;
392 SetVectorImageSize();
394 if(mPlayState == DevelImageVisual::PlayState::PLAYING && mAnimationData.playState != DevelImageVisual::PlayState::PLAYING)
396 mAnimationData.playState = DevelImageVisual::PlayState::PLAYING;
397 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
404 void AnimatedVectorImageVisual::UpdateShader()
408 Shader shader = GenerateShader();
409 mImpl->mRenderer.SetShader(shader);
413 void AnimatedVectorImageVisual::OnDoAction(const Property::Index actionId, const Property::Value& attributes)
415 // Check if action is valid for this visual type and perform action if possible
418 case DevelAnimatedVectorImageVisual::Action::PLAY:
420 if(IsOnScene() && mVisualSize != Vector2::ZERO)
422 if(mAnimationData.playState != DevelImageVisual::PlayState::PLAYING)
424 mAnimationData.playState = DevelImageVisual::PlayState::PLAYING;
425 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
428 mPlayState = DevelImageVisual::PlayState::PLAYING;
431 case DevelAnimatedVectorImageVisual::Action::PAUSE:
433 if(mAnimationData.playState == DevelImageVisual::PlayState::PLAYING)
435 mAnimationData.playState = DevelImageVisual::PlayState::PAUSED;
436 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
438 mPlayState = DevelImageVisual::PlayState::PAUSED;
441 case DevelAnimatedVectorImageVisual::Action::STOP:
443 if(mAnimationData.playState != DevelImageVisual::PlayState::STOPPED)
445 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
446 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
448 mPlayState = DevelImageVisual::PlayState::STOPPED;
451 case DevelAnimatedVectorImageVisual::Action::JUMP_TO:
454 if(attributes.Get(frameNumber))
456 mAnimationData.currentFrame = frameNumber;
457 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_CURRENT_FRAME;
463 TriggerVectorRasterization();
466 void AnimatedVectorImageVisual::OnUploadCompleted()
468 // If weak handle is holding a placement actor, it is the time to add the renderer to actor.
469 Actor actor = mPlacementActor.GetHandle();
470 if(actor && !mRendererAdded)
472 actor.AddRenderer(mImpl->mRenderer);
473 mRendererAdded = true;
475 ResourceReady(Toolkit::Visual::ResourceStatus::READY);
477 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnUploadCompleted: Renderer is added [%p]\n", this);
481 void AnimatedVectorImageVisual::OnAnimationFinished()
483 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnAnimationFinished: action state = %d [%p]\n", mPlayState, this);
485 if(mPlayState != DevelImageVisual::PlayState::STOPPED)
487 mPlayState = DevelImageVisual::PlayState::STOPPED;
489 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
491 if(mImpl->mEventObserver)
493 mImpl->mEventObserver->NotifyVisualEvent(*this, DevelAnimatedVectorImageVisual::Signal::ANIMATION_FINISHED);
499 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED);
503 void AnimatedVectorImageVisual::SendAnimationData()
505 if(mAnimationData.resendFlag)
507 mVectorAnimationTask->SetAnimationData(mAnimationData);
511 if(mAnimationData.playState == DevelImageVisual::PlayState::PLAYING)
513 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY);
517 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED);
521 mAnimationData.resendFlag = 0;
525 void AnimatedVectorImageVisual::SetVectorImageSize()
527 uint32_t width = static_cast<uint32_t>(mVisualSize.width * mVisualScale.width);
528 uint32_t height = static_cast<uint32_t>(mVisualSize.height * mVisualScale.height);
530 mAnimationData.width = width;
531 mAnimationData.height = height;
532 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_SIZE;
535 void AnimatedVectorImageVisual::StopAnimation()
537 if(mAnimationData.playState != DevelImageVisual::PlayState::STOPPED)
539 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
540 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
542 mPlayState = DevelImageVisual::PlayState::STOPPED;
546 void AnimatedVectorImageVisual::TriggerVectorRasterization()
548 if(!mEventCallback && !mCoreShutdown)
550 mEventCallback = MakeCallback(this, &AnimatedVectorImageVisual::OnProcessEvents);
551 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
552 vectorAnimationManager.RegisterEventCallback(mEventCallback);
553 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
557 void AnimatedVectorImageVisual::OnScaleNotification(PropertyNotification& source)
559 Actor actor = mPlacementActor.GetHandle();
562 Vector3 scale = actor.GetProperty<Vector3>(Actor::Property::WORLD_SCALE);
564 if(mRedrawInScalingDown || scale.width >= 1.0f || scale.height >= 1.0f)
566 mVisualScale.width = scale.width;
567 mVisualScale.height = scale.height;
569 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnScaleNotification: scale = %f, %f [%p]\n", mVisualScale.width, mVisualScale.height, this);
571 SetVectorImageSize();
574 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
579 void AnimatedVectorImageVisual::OnSizeNotification(PropertyNotification& source)
581 Actor actor = mPlacementActor.GetHandle();
584 Vector3 size = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE);
585 mVisualSize.width = size.width;
586 mVisualSize.height = size.height;
588 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSizeNotification: size = %f, %f [%p]\n", mVisualSize.width, mVisualSize.height, this);
590 SetVectorImageSize();
593 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
597 void AnimatedVectorImageVisual::OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type)
602 TriggerVectorRasterization();
604 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this);
608 void AnimatedVectorImageVisual::OnWindowVisibilityChanged(Window window, bool visible)
613 TriggerVectorRasterization();
615 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this);
619 void AnimatedVectorImageVisual::OnProcessEvents()
623 mEventCallback = nullptr; // The callback will be deleted in the VectorAnimationManager
626 Shader AnimatedVectorImageVisual::GenerateShader() const
629 if(mImpl->mCustomShader)
631 shader = Shader::New(mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource().data() : mImpl->mCustomShader->mVertexShader,
632 mImpl->mCustomShader->mFragmentShader.empty() ? mImageVisualShaderFactory.GetFragmentShaderSource().data() : mImpl->mCustomShader->mFragmentShader,
633 mImpl->mCustomShader->mHints);
635 shader.RegisterProperty(PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT);
639 shader = mImageVisualShaderFactory.GetShader(
641 ImageVisualShaderFeature::FeatureBuilder()
642 .EnableRoundedCorner(IsRoundedCornerRequired())
643 .EnableBorderline(IsBorderlineRequired()));
648 } // namespace Internal
650 } // namespace Toolkit