2 * Copyright (c) 2021 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/internal/visuals/animated-vector-image/vector-animation-manager.h>
31 #include <dali-toolkit/internal/visuals/image-visual-shader-factory.h>
32 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
33 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
34 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
35 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>
36 #include <dali-toolkit/public-api/visuals/visual-properties.h>
46 const Dali::Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
49 DALI_ENUM_TO_STRING_TABLE_BEGIN(STOP_BEHAVIOR)
50 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::StopBehavior, CURRENT_FRAME)
51 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::StopBehavior, FIRST_FRAME)
52 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::StopBehavior, LAST_FRAME)
53 DALI_ENUM_TO_STRING_TABLE_END(STOP_BEHAVIOR)
56 DALI_ENUM_TO_STRING_TABLE_BEGIN(LOOPING_MODE)
57 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::LoopingMode, RESTART)
58 DALI_ENUM_TO_STRING_WITH_SCOPE(Dali::Toolkit::DevelImageVisual::LoopingMode, AUTO_REVERSE)
59 DALI_ENUM_TO_STRING_TABLE_END(LOOPING_MODE)
61 #if defined(DEBUG_ENABLED)
62 Debug::Filter* gVectorAnimationLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_VECTOR_ANIMATION");
65 } // unnamed namespace
67 AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties)
69 AnimatedVectorImageVisualPtr visual(new AnimatedVectorImageVisual(factoryCache, shaderFactory, imageUrl));
70 visual->SetProperties(properties);
75 AnimatedVectorImageVisualPtr AnimatedVectorImageVisual::New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl)
77 AnimatedVectorImageVisualPtr visual(new AnimatedVectorImageVisual(factoryCache, shaderFactory, imageUrl));
82 AnimatedVectorImageVisual::AnimatedVectorImageVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl)
83 : Visual::Base(factoryCache, Visual::FittingMode::FILL, static_cast<Toolkit::Visual::Type>(Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE)),
86 mVectorAnimationTask(new VectorAnimationTask(factoryCache)),
87 mImageVisualShaderFactory(shaderFactory),
89 mVisualScale(Vector2::ONE),
91 mPlayState(DevelImageVisual::PlayState::STOPPED),
92 mEventCallback(nullptr),
94 mRendererAdded(false),
96 mRedrawInScalingDown(true)
98 // the rasterized image is with pre-multiplied alpha format
99 mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
101 if(!mVectorAnimationTask->Load(mUrl.GetUrl()))
106 mVectorAnimationTask->UploadCompletedSignal().Connect(this, &AnimatedVectorImageVisual::OnUploadCompleted);
107 mVectorAnimationTask->SetAnimationFinishedCallback(new EventThreadCallback(MakeCallback(this, &AnimatedVectorImageVisual::OnAnimationFinished)));
109 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
110 vectorAnimationManager.AddObserver(*this);
113 AnimatedVectorImageVisual::~AnimatedVectorImageVisual()
117 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
118 vectorAnimationManager.RemoveObserver(*this);
122 mFactoryCache.GetVectorAnimationManager().UnregisterEventCallback(mEventCallback);
125 // Finalize animation task and disconnect the signal in the main thread
126 mVectorAnimationTask->UploadCompletedSignal().Disconnect(this, &AnimatedVectorImageVisual::OnUploadCompleted);
127 mVectorAnimationTask->Finalize();
131 void AnimatedVectorImageVisual::VectorAnimationManagerDestroyed()
133 // Core is shutting down. Don't talk to the plugin any more.
134 mCoreShutdown = true;
137 void AnimatedVectorImageVisual::GetNaturalSize(Vector2& naturalSize)
139 if(mVisualSize != Vector2::ZERO)
141 naturalSize = mVisualSize;
145 uint32_t width, height;
146 mVectorAnimationTask->GetDefaultSize(width, height);
147 naturalSize.x = width;
148 naturalSize.y = height;
151 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::GetNaturalSize: w = %f, h = %f [%p]\n", naturalSize.width, naturalSize.height, this);
154 void AnimatedVectorImageVisual::DoCreatePropertyMap(Property::Map& map) const
157 map.Insert(Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::ANIMATED_VECTOR_IMAGE);
160 map.Insert(Toolkit::ImageVisual::Property::URL, mUrl.GetUrl());
162 map.Insert(Toolkit::DevelImageVisual::Property::LOOP_COUNT, mAnimationData.loopCount);
164 uint32_t startFrame, endFrame;
165 mVectorAnimationTask->GetPlayRange(startFrame, endFrame);
167 Property::Array playRange;
168 playRange.PushBack(static_cast<int32_t>(startFrame));
169 playRange.PushBack(static_cast<int32_t>(endFrame));
170 map.Insert(Toolkit::DevelImageVisual::Property::PLAY_RANGE, playRange);
172 map.Insert(Toolkit::DevelImageVisual::Property::PLAY_STATE, static_cast<int32_t>(mPlayState));
173 map.Insert(Toolkit::DevelImageVisual::Property::CURRENT_FRAME_NUMBER, static_cast<int32_t>(mVectorAnimationTask->GetCurrentFrameNumber()));
174 map.Insert(Toolkit::DevelImageVisual::Property::TOTAL_FRAME_NUMBER, static_cast<int32_t>(mVectorAnimationTask->GetTotalFrameNumber()));
176 map.Insert(Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, mAnimationData.stopBehavior);
177 map.Insert(Toolkit::DevelImageVisual::Property::LOOPING_MODE, mAnimationData.loopingMode);
178 map.Insert(Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, mRedrawInScalingDown);
180 Property::Map layerInfo;
181 mVectorAnimationTask->GetLayerInfo(layerInfo);
182 map.Insert(Toolkit::DevelImageVisual::Property::CONTENT_INFO, layerInfo);
185 void AnimatedVectorImageVisual::DoCreateInstancePropertyMap(Property::Map& map) const
190 void AnimatedVectorImageVisual::DoSetProperties(const Property::Map& propertyMap)
192 // url already passed in from constructor
193 for(Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter)
195 KeyValuePair keyValue = propertyMap.GetKeyValue(iter);
196 if(keyValue.first.type == Property::Key::INDEX)
198 DoSetProperty(keyValue.first.indexKey, keyValue.second);
202 if(keyValue.first == LOOP_COUNT_NAME)
204 DoSetProperty(Toolkit::DevelImageVisual::Property::LOOP_COUNT, keyValue.second);
206 else if(keyValue.first == PLAY_RANGE_NAME)
208 DoSetProperty(Toolkit::DevelImageVisual::Property::PLAY_RANGE, keyValue.second);
210 else if(keyValue.first == STOP_BEHAVIOR_NAME)
212 DoSetProperty(Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR, keyValue.second);
214 else if(keyValue.first == LOOPING_MODE_NAME)
216 DoSetProperty(Toolkit::DevelImageVisual::Property::LOOPING_MODE, keyValue.second);
218 else if(keyValue.first == REDRAW_IN_SCALING_DOWN_NAME)
220 DoSetProperty(Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN, keyValue.second);
225 TriggerVectorRasterization();
228 void AnimatedVectorImageVisual::DoSetProperty(Property::Index index, const Property::Value& value)
232 case Toolkit::DevelImageVisual::Property::LOOP_COUNT:
235 if(value.Get(loopCount))
237 mAnimationData.loopCount = loopCount;
238 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_LOOP_COUNT;
242 case Toolkit::DevelImageVisual::Property::PLAY_RANGE:
244 const Property::Array* array = value.GetArray();
247 mAnimationData.playRange = *array;
248 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_RANGE;
252 case Toolkit::DevelImageVisual::Property::STOP_BEHAVIOR:
254 int32_t stopBehavior = mAnimationData.stopBehavior;
255 if(Scripting::GetEnumerationProperty(value, STOP_BEHAVIOR_TABLE, STOP_BEHAVIOR_TABLE_COUNT, stopBehavior))
257 mAnimationData.stopBehavior = DevelImageVisual::StopBehavior::Type(stopBehavior);
258 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_STOP_BEHAVIOR;
262 case Toolkit::DevelImageVisual::Property::LOOPING_MODE:
264 int32_t loopingMode = mAnimationData.loopingMode;
265 if(Scripting::GetEnumerationProperty(value, LOOPING_MODE_TABLE, LOOPING_MODE_TABLE_COUNT, loopingMode))
267 mAnimationData.loopingMode = DevelImageVisual::LoopingMode::Type(loopingMode);
268 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_LOOPING_MODE;
272 case Toolkit::DevelImageVisual::Property::REDRAW_IN_SCALING_DOWN:
275 if(value.Get(redraw))
277 mRedrawInScalingDown = redraw;
284 void AnimatedVectorImageVisual::OnInitialize(void)
286 Shader shader = GenerateShader();
288 Geometry geometry = mFactoryCache.GetGeometry(VisualFactoryCache::QUAD_GEOMETRY);
290 mImpl->mRenderer = Renderer::New(geometry, shader);
292 TextureSet textureSet = TextureSet::New();
293 mImpl->mRenderer.SetTextures(textureSet);
295 // Register transform properties
296 mImpl->mTransform.RegisterUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
299 void AnimatedVectorImageVisual::DoSetOnScene(Actor& actor)
301 // Defer the rasterisation task until we get given a size (by Size Negotiation algorithm)
303 // Hold the weak handle of the placement actor and delay the adding of renderer until the rasterization is finished.
304 mPlacementActor = actor;
308 Vector2 imageSize = Vector2::ZERO;
309 imageSize = actor.GetProperty(Actor::Property::SIZE).Get<Vector2>();
310 mFactoryCache.GetBrokenImageRenderer(mImpl->mRenderer, imageSize);
311 actor.AddRenderer(mImpl->mRenderer);
312 ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
316 mVectorAnimationTask->SetRenderer(mImpl->mRenderer);
318 // Add property notification for scaling & size
319 mScaleNotification = actor.AddPropertyNotification(Actor::Property::WORLD_SCALE, StepCondition(0.1f, 1.0f));
320 mScaleNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnScaleNotification);
322 mSizeNotification = actor.AddPropertyNotification(Actor::Property::SIZE, StepCondition(3.0f));
323 mSizeNotification.NotifySignal().Connect(this, &AnimatedVectorImageVisual::OnSizeNotification);
325 DevelActor::VisibilityChangedSignal(actor).Connect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
327 Window window = DevelWindow::Get(actor);
330 DevelWindow::VisibilityChangedSignal(window).Connect(this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged);
334 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnScene [%p]\n", this);
337 void AnimatedVectorImageVisual::DoSetOffScene(Actor& actor)
344 actor.RemoveRenderer(mImpl->mRenderer);
345 mRendererAdded = false;
348 // Remove property notification
349 actor.RemovePropertyNotification(mScaleNotification);
350 actor.RemovePropertyNotification(mSizeNotification);
352 DevelActor::VisibilityChangedSignal(actor).Disconnect(this, &AnimatedVectorImageVisual::OnControlVisibilityChanged);
354 Window window = DevelWindow::Get(actor);
357 DevelWindow::VisibilityChangedSignal(window).Disconnect(this, &AnimatedVectorImageVisual::OnWindowVisibilityChanged);
360 mPlacementActor.Reset();
362 // Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
363 mVisualSize = Vector2::ZERO;
364 mVisualScale = Vector2::ONE;
366 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOffScene [%p]\n", this);
369 void AnimatedVectorImageVisual::OnSetTransform()
371 Vector2 visualSize = mImpl->mTransform.GetVisualSize(mImpl->mControlSize);
373 if(IsOnScene() && visualSize != mVisualSize)
375 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: width = %f, height = %f [%p]\n", visualSize.width, visualSize.height, this);
377 mVisualSize = visualSize;
379 SetVectorImageSize();
381 if(mPlayState == DevelImageVisual::PlayState::PLAYING && mAnimationData.playState != DevelImageVisual::PlayState::PLAYING)
383 mAnimationData.playState = DevelImageVisual::PlayState::PLAYING;
384 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
391 void AnimatedVectorImageVisual::UpdateShader()
395 Shader shader = GenerateShader();
396 mImpl->mRenderer.SetShader(shader);
400 void AnimatedVectorImageVisual::OnDoAction(const Property::Index actionId, const Property::Value& attributes)
402 // Check if action is valid for this visual type and perform action if possible
405 case DevelAnimatedVectorImageVisual::Action::PLAY:
407 if(IsOnScene() && mVisualSize != Vector2::ZERO)
409 if(mAnimationData.playState != DevelImageVisual::PlayState::PLAYING)
411 mAnimationData.playState = DevelImageVisual::PlayState::PLAYING;
412 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
415 mPlayState = DevelImageVisual::PlayState::PLAYING;
418 case DevelAnimatedVectorImageVisual::Action::PAUSE:
420 if(mAnimationData.playState == DevelImageVisual::PlayState::PLAYING)
422 mAnimationData.playState = DevelImageVisual::PlayState::PAUSED;
423 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
425 mPlayState = DevelImageVisual::PlayState::PAUSED;
428 case DevelAnimatedVectorImageVisual::Action::STOP:
430 if(mAnimationData.playState != DevelImageVisual::PlayState::STOPPED)
432 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
433 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
435 mPlayState = DevelImageVisual::PlayState::STOPPED;
438 case DevelAnimatedVectorImageVisual::Action::JUMP_TO:
441 if(attributes.Get(frameNumber))
443 mAnimationData.currentFrame = frameNumber;
444 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_CURRENT_FRAME;
448 case DevelAnimatedVectorImageVisual::Action::UPDATE_PROPERTY:
450 const Property::Map* map = attributes.GetMap();
453 DoSetProperties(*map);
459 TriggerVectorRasterization();
462 void AnimatedVectorImageVisual::OnUploadCompleted()
464 // If weak handle is holding a placement actor, it is the time to add the renderer to actor.
465 Actor actor = mPlacementActor.GetHandle();
466 if(actor && !mRendererAdded)
468 actor.AddRenderer(mImpl->mRenderer);
469 mRendererAdded = true;
471 ResourceReady(Toolkit::Visual::ResourceStatus::READY);
473 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnUploadCompleted: Renderer is added [%p]\n", this);
477 void AnimatedVectorImageVisual::OnAnimationFinished()
479 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnAnimationFinished: action state = %d [%p]\n", mPlayState, this);
481 if(mPlayState != DevelImageVisual::PlayState::STOPPED)
483 mPlayState = DevelImageVisual::PlayState::STOPPED;
485 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
487 if(mImpl->mEventObserver)
489 mImpl->mEventObserver->NotifyVisualEvent(*this, DevelAnimatedVectorImageVisual::Signal::ANIMATION_FINISHED);
495 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED);
499 void AnimatedVectorImageVisual::SendAnimationData()
501 if(mAnimationData.resendFlag)
503 mVectorAnimationTask->SetAnimationData(mAnimationData);
507 if(mAnimationData.playState == DevelImageVisual::PlayState::PLAYING)
509 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY);
513 mImpl->mRenderer.SetProperty(DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED);
517 mAnimationData.resendFlag = 0;
521 void AnimatedVectorImageVisual::SetVectorImageSize()
523 uint32_t width = static_cast<uint32_t>(mVisualSize.width * mVisualScale.width);
524 uint32_t height = static_cast<uint32_t>(mVisualSize.height * mVisualScale.height);
526 mAnimationData.width = width;
527 mAnimationData.height = height;
528 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_SIZE;
531 void AnimatedVectorImageVisual::StopAnimation()
533 if(mAnimationData.playState != DevelImageVisual::PlayState::STOPPED)
535 mAnimationData.playState = DevelImageVisual::PlayState::STOPPED;
536 mAnimationData.resendFlag |= VectorAnimationTask::RESEND_PLAY_STATE;
538 mPlayState = DevelImageVisual::PlayState::STOPPED;
542 void AnimatedVectorImageVisual::TriggerVectorRasterization()
544 if(!mEventCallback && !mCoreShutdown)
546 mEventCallback = MakeCallback(this, &AnimatedVectorImageVisual::OnProcessEvents);
547 auto& vectorAnimationManager = mFactoryCache.GetVectorAnimationManager();
548 vectorAnimationManager.RegisterEventCallback(mEventCallback);
549 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
553 void AnimatedVectorImageVisual::OnScaleNotification(PropertyNotification& source)
555 Actor actor = mPlacementActor.GetHandle();
558 Vector3 scale = actor.GetProperty<Vector3>(Actor::Property::WORLD_SCALE);
560 if(mRedrawInScalingDown || scale.width >= 1.0f || scale.height >= 1.0f)
562 mVisualScale.width = scale.width;
563 mVisualScale.height = scale.height;
565 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnScaleNotification: scale = %f, %f [%p]\n", mVisualScale.width, mVisualScale.height, this);
567 SetVectorImageSize();
570 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
575 void AnimatedVectorImageVisual::OnSizeNotification(PropertyNotification& source)
577 Actor actor = mPlacementActor.GetHandle();
580 Vector3 size = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE);
581 mVisualSize.width = size.width;
582 mVisualSize.height = size.height;
584 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSizeNotification: size = %f, %f [%p]\n", mVisualSize.width, mVisualSize.height, this);
586 SetVectorImageSize();
589 Stage::GetCurrent().KeepRendering(0.0f); // Trigger event processing
593 void AnimatedVectorImageVisual::OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type)
598 TriggerVectorRasterization();
600 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnControlVisibilityChanged: invisibile. Pause animation [%p]\n", this);
604 void AnimatedVectorImageVisual::OnWindowVisibilityChanged(Window window, bool visible)
609 TriggerVectorRasterization();
611 DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnWindowVisibilityChanged: invisibile. Pause animation [%p]\n", this);
615 void AnimatedVectorImageVisual::OnProcessEvents()
619 mEventCallback = nullptr; // The callback will be deleted in the VectorAnimationManager
622 Shader AnimatedVectorImageVisual::GenerateShader() const
625 if(mImpl->mCustomShader)
627 shader = Shader::New(mImpl->mCustomShader->mVertexShader.empty() ? mImageVisualShaderFactory.GetVertexShaderSource().data() : mImpl->mCustomShader->mVertexShader,
628 mImpl->mCustomShader->mFragmentShader.empty() ? mImageVisualShaderFactory.GetFragmentShaderSource().data() : mImpl->mCustomShader->mFragmentShader,
629 mImpl->mCustomShader->mHints);
631 shader.RegisterProperty(PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT);
635 shader = mImageVisualShaderFactory.GetShader(
637 TextureAtlas::DISABLED,
638 DefaultTextureWrapMode::APPLY,
639 IsRoundedCornerRequired() ? RoundedCorner::ENABLED : RoundedCorner::DISABLED,
640 IsBorderlineRequired() ? Borderline::ENABLED : Borderline::DISABLED
647 } // namespace Internal
649 } // namespace Toolkit