/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
AnimatedGradientVisualPtr animatedGradientVisualPtr( new AnimatedGradientVisual( factoryCache ) );
animatedGradientVisualPtr->SetProperties( properties );
+ animatedGradientVisualPtr->Initialize();
return animatedGradientVisualPtr;
}
void AnimatedGradientVisual::DoSetOnScene( Actor& actor )
{
- InitializeRenderer();
actor.AddRenderer( mImpl->mRenderer );
SetupAnimation();
PlayAnimation();
StopAnimation();
actor.RemoveRenderer( mImpl->mRenderer );
- mImpl->mRenderer.Reset();
}
void AnimatedGradientVisual::DoCreatePropertyMap( Property::Map& map ) const
return shader;
}
-void AnimatedGradientVisual::InitializeRenderer()
+void AnimatedGradientVisual::OnInitialize()
{
Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );
VisualFactoryCache::ShaderType shaderType = GetShaderType( mGradientType, mUnitType, mSpreadType );