+
+ // Rasterized pixels are uploaded to texture. If weak handle is holding a placement actor, it is the time to add the renderer to actor.
+ Actor actor = mPlacementActor.GetHandle();
+ if(actor)
+ {
+ actor.AddRenderer(mImpl->mRenderer);
+ // reset the weak handle so that the renderer only get added to actor once
+ mPlacementActor.Reset();
+ }
+
+ // Svg loaded and ready to display
+ ResourceReady(Toolkit::Visual::ResourceStatus::READY);
+ }
+ else if(!isLoaded || !rasterizedPixelData)
+ {
+ Actor actor = mPlacementActor.GetHandle();
+ if(actor)
+ {
+ Vector2 imageSize = Vector2::ZERO;
+ imageSize = actor.GetProperty(Actor::Property::SIZE).Get<Vector2>();
+ mFactoryCache.UpdateBrokenImageRenderer(mImpl->mRenderer, imageSize);
+ actor.AddRenderer(mImpl->mRenderer);
+ }
+
+ ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
+ }
+}
+
+void SvgVisual::OnSetTransform()
+{
+ Vector2 visualSize = mImpl->mTransform.GetVisualSize(mImpl->mControlSize);
+
+ if(IsOnScene() && !mLoadFailed)
+ {
+ if(visualSize != mVisualSize)
+ {
+ AddRasterizationTask(visualSize);
+ mVisualSize = visualSize;
+ }
+ }
+
+ if(mImpl->mRenderer)
+ {
+ mImpl->mTransform.RegisterUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);