application.SendNotification();
application.Render();
- // Wait for resource ready event callback
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
Renderer renderer = actor.GetRendererAt( 0u );
Dali::TextureSet textureSet = mRenderer.GetTextures();
Dali::Texture texture = Dali::Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, mWidth, mHeight );
textureSet.SetTexture( 0, texture );
+ mUploadCompletedSignal.Emit();
}
}
Dali::TextureSet textureSet = mRenderer.GetTextures();
Dali::Texture texture = Dali::Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, mWidth, mHeight );
textureSet.SetTexture( 0, texture );
+ mUploadCompletedSignal.Emit();
}
}
height = 100;
}
+ Dali::VectorAnimationRenderer::UploadCompletedSignalType& UploadCompletedSignal()
+ {
+ return mUploadCompletedSignal;
+ }
+
public:
std::string mUrl;
uint32_t mWidth;
uint32_t mHeight;
uint32_t mPreviousFrame;
+ Dali::VectorAnimationRenderer::UploadCompletedSignalType mUploadCompletedSignal;
};
inline VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer )
Internal::Adaptor::GetImplementation( *this ).GetDefaultSize( width, height );
}
+VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
+{
+ return Internal::Adaptor::GetImplementation( *this ).UploadCompletedSignal();
+}
+
} // namespace Dali;
application.SendNotification();
application.Render();
- // Wait for resource ready event callback
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
Renderer renderer = actor.GetRendererAt( 0u );
application.SendNotification();
application.Render();
- // Wait for resource ready event callback
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
Renderer renderer = actor.GetRendererAt( 0u );
application.SendNotification();
application.Render();
- // Wait for resource ready event callback
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
Renderer renderer = actor.GetRendererAt( 0u );
application.SendNotification();
application.Render();
- // Wait for resource ready event callback
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
Renderer renderer = actor.GetRendererAt( 0u );
std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) ); // wait for one animation loop (16fps, 5frames, need 80ms)
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
Property::Map map = dummyControl.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
Property::Value* value = map.Find( DevelImageVisual::Property::PLAY_STATE );
DALI_TEST_CHECK( value->Get< int >() == DevelImageVisual::PlayState::PLAYING );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
Renderer renderer = dummy.GetRendererAt( 0 );
Shader shader2 = renderer.GetShader();
Property::Value value = shader2.GetProperty( Shader::Property::PROGRAM );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, Vector2( 100.0f, 100.0f ), TEST_LOCATION ); // 100x100 is the content default size.
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
visual.GetNaturalSize( naturalSize );
DALI_TEST_EQUALS( naturalSize, controlSize, TEST_LOCATION );
application.SendNotification();
application.Render();
- // Trigger count is 2 - resource ready and animation finished
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
+ // Trigger count is 1 - animation finished
+ DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
// renderer is added to actor
DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
Renderer renderer = actor.GetRendererAt( 0u );
application.Render();
// Wait for animation finish
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
Property::Value* value = map.Find( DevelImageVisual::Property::PLAY_STATE );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::JUMP_TO, 2 );
application.SendNotification();
value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
DALI_TEST_EQUALS( value->Get< int >(), 3, TEST_LOCATION );
+ // Jump to the same position
+ DevelControl::DoAction( actor, DummyControl::Property::TEST_VISUAL, Dali::Toolkit::DevelAnimatedVectorImageVisual::Action::JUMP_TO, 3 );
+
+ application.SendNotification();
+ application.Render();
+
+ map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
+ value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
+ DALI_TEST_EQUALS( value->Get< int >(), 3, TEST_LOCATION );
+
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
-
Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
Property::Value* value = map.Find( DevelImageVisual::Property::LOOP_COUNT );
DALI_TEST_EQUALS( value->Get< int >(), 3, TEST_LOCATION );
application.SendNotification();
application.Render();
- // Trigger count is 2 - resource ready and animation finished
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
+ // Trigger count is 1 - animation finished
+ DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
Property::Value* value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
application.SendNotification();
application.Render();
- // Trigger count is 2 - resource ready and animation finished
- DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 2 ), true, TEST_LOCATION );
+ // Trigger count is 1 - animation finished
+ DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
Property::Map map = actor.GetProperty< Property::Map >( DummyControl::Property::TEST_VISUAL );
Property::Value* value = map.Find( DevelImageVisual::Property::CURRENT_FRAME_NUMBER );
END_TEST;
}
+
+int UtcDaliAnimatedVectorImageVisualPropertyNotification(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline( "UtcDaliAnimatedVectorImageVisualPropertyNotification" );
+
+ Property::Map propertyMap;
+ propertyMap.Add( Toolkit::Visual::Property::TYPE, DevelVisual::ANIMATED_VECTOR_IMAGE )
+ .Add( ImageVisual::Property::URL, TEST_VECTOR_IMAGE_FILE_NAME );
+
+ Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+ DALI_TEST_CHECK( visual );
+
+ DummyControl actor = DummyControl::New( true );
+ DummyControlImpl& dummyImpl = static_cast< DummyControlImpl& >( actor.GetImplementation() );
+ dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+ Vector2 controlSize( 20.f, 30.f );
+ Vector3 controlScale( 2.0f, 2.0f, 1.0f );
+ actor.SetSize( controlSize );
+ actor.SetScale( controlScale );
+
+ Stage::GetCurrent().Add( actor );
+
+ application.SendNotification();
+ application.Render();
+
+ application.SendNotification();
+ application.Render();
+
+ Renderer renderer = actor.GetRendererAt( 0u );
+ DALI_TEST_CHECK( renderer );
+
+ auto textureSet = renderer.GetTextures();
+ auto texture = textureSet.GetTexture(0);
+
+ DALI_TEST_EQUALS( controlSize.width * controlScale.width, texture.GetWidth(), TEST_LOCATION );
+ DALI_TEST_EQUALS( controlSize.height * controlScale.height, texture.GetHeight(), TEST_LOCATION );
+
+ // Change scale and size
+ controlSize = Vector2( 50.f, 40.f );
+ controlScale= Vector3( 0.5f, 0.5f, 1.0f );
+ actor.SetSize( controlSize );
+ actor.SetScale( controlScale );
+
+ application.SendNotification();
+ application.Render();
+
+ application.SendNotification();
+ application.Render();
+
+ renderer = actor.GetRendererAt( 0u );
+ DALI_TEST_CHECK( renderer );
+
+ textureSet = renderer.GetTextures();
+ texture = textureSet.GetTexture(0);
+
+ DALI_TEST_EQUALS( controlSize.width * controlScale.width, texture.GetWidth(), TEST_LOCATION );
+ DALI_TEST_EQUALS( controlSize.height * controlScale.height, texture.GetHeight(), TEST_LOCATION );
+
+ END_TEST;
+}
mUrl( imageUrl ),
mVectorRasterizeThread( imageUrl.GetUrl() ),
mVisualSize(),
+ mVisualScale( Vector2::ONE ),
mPlacementActor(),
mLoopCount( LOOP_FOREVER ),
mStartFrame( 0 ),
mResendFlag( 0 ),
mActionStatus( DevelAnimatedVectorImageVisual::Action::STOP ),
mStopBehavior( DevelImageVisual::StopBehavior::CURRENT_FRAME ),
- mLoopingMode( DevelImageVisual::LoopingMode::RESTART )
+ mLoopingMode( DevelImageVisual::LoopingMode::RESTART ),
+ mRendererAdded( false )
{
// the rasterized image is with pre-multiplied alpha format
mImpl->mFlags |= Impl::IS_PREMULTIPLIED_ALPHA;
- mVectorRasterizeThread.SetResourceReadyCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnResourceReady ) ) );
+ mVectorRasterizeThread.UploadCompletedSignal().Connect( this, &AnimatedVectorImageVisual::OnUploadCompleted );
mVectorRasterizeThread.SetAnimationFinishedCallback( new EventThreadCallback( MakeCallback( this, &AnimatedVectorImageVisual::OnAnimationFinished ) ) );
mVectorRasterizeThread.Start();
void AnimatedVectorImageVisual::GetNaturalSize( Vector2& naturalSize )
{
- if( mImpl->mRenderer ) // Check if we have a rendered image
+ if( mVisualSize != Vector2::ZERO )
{
- auto textureSet = mImpl->mRenderer.GetTextures();
- if( textureSet )
- {
- if( textureSet.GetTextureCount() > 0 )
- {
- auto texture = textureSet.GetTexture( 0 );
- naturalSize.x = texture.GetWidth();
- naturalSize.y = texture.GetHeight();
- return;
- }
- }
+ naturalSize = mVisualSize;
+ }
+ else
+ {
+ uint32_t width, height;
+ mVectorRasterizeThread.GetDefaultSize( width, height );
+ naturalSize.x = width;
+ naturalSize.y = height;
}
- uint32_t width, height;
- mVectorRasterizeThread.GetDefaultSize( width, height );
- naturalSize.x = width;
- naturalSize.y = height;
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::GetNaturalSize: w = %f, h = %f [%p]\n", naturalSize.width, naturalSize.height, this );
}
void AnimatedVectorImageVisual::DoCreatePropertyMap( Property::Map& map ) const
mVectorRasterizeThread.SetRenderer( mImpl->mRenderer );
+ // Add property notification for scaling & size
+ mScaleNotification = actor.AddPropertyNotification( Actor::Property::WORLD_SCALE, StepCondition( 0.1f, 1.0f ) );
+ mScaleNotification.NotifySignal().Connect( this, &AnimatedVectorImageVisual::OnScaleNotification );
+
+ mSizeNotification = actor.AddPropertyNotification( Actor::Property::SIZE, StepCondition( 3.0f ) );
+ mSizeNotification.NotifySignal().Connect( this, &AnimatedVectorImageVisual::OnSizeNotification );
+
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnStage [%p]\n", this );
}
actor.RemoveRenderer( mImpl->mRenderer );
mImpl->mRenderer.Reset();
+
+ mRendererAdded = false;
}
+ // Remove property notification
+ actor.RemovePropertyNotification( mScaleNotification );
+ actor.RemovePropertyNotification( mSizeNotification );
+
mPlacementActor.Reset();
// Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
mVisualSize = Vector2::ZERO;
+ mVisualScale = Vector2::ONE;
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOffStage [%p]\n", this );
}
{
Vector2 visualSize = mImpl->mTransform.GetVisualSize( mImpl->mControlSize );
- if( IsOnStage() )
+ if( IsOnStage() && visualSize != mVisualSize )
{
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: width = %f, height = %f [%p]\n", visualSize.width, visualSize.height, this );
- if( visualSize != mVisualSize )
- {
- mVisualSize = visualSize;
+ mVisualSize = visualSize;
- uint32_t width = static_cast< uint32_t >( visualSize.width );
- uint32_t height = static_cast< uint32_t >( visualSize.height );
-
- mVectorRasterizeThread.SetSize( width, height );
- }
+ SetVectorImageSize();
SendAnimationData();
// Render one frame
mVectorRasterizeThread.RenderFrame();
}
-
- if( mVectorRasterizeThread.IsResourceReady() )
- {
- Actor actor = mPlacementActor.GetHandle();
- if( actor )
- {
- actor.AddRenderer( mImpl->mRenderer );
- mPlacementActor.Reset();
-
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: Renderer is added [%p]\n", this );
- }
-
- ResourceReady( Toolkit::Visual::ResourceStatus::READY );
- }
}
}
}
}
-void AnimatedVectorImageVisual::OnResourceReady()
+void AnimatedVectorImageVisual::OnUploadCompleted()
{
// If weak handle is holding a placement actor, it is the time to add the renderer to actor.
Actor actor = mPlacementActor.GetHandle();
- if( actor )
+ if( actor && !mRendererAdded )
{
actor.AddRenderer( mImpl->mRenderer );
- // reset the weak handle so that the renderer only get added to actor once
- mPlacementActor.Reset();
+ mRendererAdded = true;
+ }
- ResourceReady( Toolkit::Visual::ResourceStatus::READY );
+ ResourceReady( Toolkit::Visual::ResourceStatus::READY );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnResourceReady: Renderer is added [%p]\n", this );
- }
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnUploadCompleted: Renderer is added [%p]\n", this );
}
void AnimatedVectorImageVisual::OnAnimationFinished()
}
}
+void AnimatedVectorImageVisual::SetVectorImageSize()
+{
+ uint32_t width = static_cast< uint32_t >( mVisualSize.width * mVisualScale.width );
+ uint32_t height = static_cast< uint32_t >( mVisualSize.height * mVisualScale.height );
+
+ mVectorRasterizeThread.SetSize( width, height );
+
+ if( IsOnStage() && mVectorRasterizeThread.GetPlayState() != DevelImageVisual::PlayState::PLAYING )
+ {
+ mVectorRasterizeThread.RenderFrame();
+ Stage::GetCurrent().KeepRendering( 0.0f ); // Trigger rendering
+ }
+}
+
+void AnimatedVectorImageVisual::OnScaleNotification( PropertyNotification& source )
+{
+ Actor actor = mPlacementActor.GetHandle();
+ if( actor )
+ {
+ Vector3 scale = actor.GetProperty< Vector3 >( Actor::Property::WORLD_SCALE );
+ mVisualScale.width = scale.width;
+ mVisualScale.height = scale.height;
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnScaleNotification: scale = %f, %f [%p]\n", mVisualScale.width, mVisualScale.height, this );
+
+ SetVectorImageSize();
+ }
+}
+
+void AnimatedVectorImageVisual::OnSizeNotification( PropertyNotification& source )
+{
+ Actor actor = mPlacementActor.GetHandle();
+ if( actor )
+ {
+ Vector3 size = actor.GetCurrentSize();
+ mVisualSize.width = size.width;
+ mVisualSize.height = size.height;
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSizeNotification: size = %f, %f [%p]\n", mVisualSize.width, mVisualSize.height, this );
+
+ SetVectorImageSize();
+ }
+}
+
} // namespace Internal
} // namespace Toolkit
// EXTERNAL INCLUDES
#include <dali/public-api/common/intrusive-ptr.h>
#include <dali/public-api/object/weak-handle.h>
-#include <memory>
+#include <dali/public-api/object/property-notification.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
* | url | STRING |
*
*/
-class AnimatedVectorImageVisual: public Visual::Base
+class AnimatedVectorImageVisual: public Visual::Base, public ConnectionTracker
{
public:
void DoSetProperty( Property::Index index, const Property::Value& value );
/**
- * @brief Event callback from rasterize thread. This is called after the first frame is ready.
+ * @brief Called when the texture upload is completed.
*/
- void OnResourceReady();
+ void OnUploadCompleted();
/**
* @brief Event callback from rasterize thread. This is called after the animation is finished.
*/
void SendAnimationData();
+ /**
+ * @brief Set the vector image size.
+ */
+ void SetVectorImageSize();
+
+ /**
+ * @brief Callback when the world scale factor changes.
+ */
+ void OnScaleNotification( PropertyNotification& source );
+
+ /**
+ * @brief Callback when the size changes.
+ */
+ void OnSizeNotification( PropertyNotification& source );
+
// Undefined
AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete;
ImageVisualShaderFactory& mImageVisualShaderFactory;
VisualUrl mUrl;
VectorRasterizeThread mVectorRasterizeThread;
+ PropertyNotification mScaleNotification;
+ PropertyNotification mSizeNotification;
Vector2 mVisualSize;
+ Vector2 mVisualScale;
WeakHandle< Actor > mPlacementActor;
int32_t mLoopCount;
int32_t mStartFrame;
DevelAnimatedVectorImageVisual::Action::Type mActionStatus;
DevelImageVisual::StopBehavior::Type mStopBehavior;
DevelImageVisual::LoopingMode::Type mLoopingMode;
+ bool mRendererAdded;
};
} // namespace Internal
: mUrl( url ),
mVectorRenderer(),
mConditionalWait(),
- mResourceReadyTrigger(),
mAnimationFinishedTrigger(),
mPlayState( PlayState::STOPPED ),
mStopBehavior( DevelImageVisual::StopBehavior::CURRENT_FRAME ),
}
}
-void VectorRasterizeThread::SetResourceReadyCallback( EventThreadCallback* callback )
-{
- ConditionalWait::ScopedLock lock( mConditionalWait );
- mResourceReadyTrigger = std::unique_ptr< EventThreadCallback >( callback );
-}
-
void VectorRasterizeThread::SetAnimationFinishedCallback( EventThreadCallback* callback )
{
ConditionalWait::ScopedLock lock( mConditionalWait );
{
ConditionalWait::ScopedLock lock( mConditionalWait );
- if( frameNumber >= mStartFrame && frameNumber <= mEndFrame && mCurrentFrame != frameNumber )
+ if( mCurrentFrame == frameNumber )
+ {
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetCurrentFrameNumber: Set same frame [%d] [%p]\n", frameNumber, this );
+ return;
+ }
+
+ if( frameNumber >= mStartFrame && frameNumber <= mEndFrame )
{
mCurrentFrame = frameNumber;
mCurrentFrameUpdated = true;
DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetLoopingMode: looping mode = %d [%p]\n", mLoopingMode, this );
}
+VectorRasterizeThread::UploadCompletedSignalType& VectorRasterizeThread::UploadCompletedSignal()
+{
+ return mVectorRenderer.UploadCompletedSignal();
+}
+
void VectorRasterizeThread::Initialize()
{
mVectorRenderer = VectorAnimationRenderer::New( mUrl );
void VectorRasterizeThread::Rasterize()
{
- bool resourceReady, stopped = false;
+ bool stopped = false;
uint32_t currentFrame, startFrame, endFrame;
int32_t loopCount;
mCurrentFrame = mForward ? mCurrentFrame + 1 : mCurrentFrame - 1;
}
- resourceReady = mResourceReady;
currentFrame = mCurrentFrame;
startFrame = mStartFrame;
endFrame = mEndFrame;
loopCount = mLoopCount;
- mNeedRender = false;
mResourceReady = true;
+ mNeedRender = false;
mCurrentFrameUpdated = false;
mUpdateFrameNumber = true;
}
mUpdateFrameNumber = false;
}
- if( !resourceReady )
- {
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Resource ready trigger [current = %d] [%p]\n", currentFrame, this );
-
- mResourceReadyTrigger->Trigger();
- }
-
if( stopped )
{
mPlayState = PlayState::STOPPED;
{
public:
+ using UploadCompletedSignalType = Dali::VectorAnimationRenderer::UploadCompletedSignalType;
+
/**
* @brief Constructor.
*
void RenderFrame();
/**
- * @brief This callback is called after the first frame is ready.
- * @param[in] callback The resource ready callback
- */
- void SetResourceReadyCallback( EventThreadCallback* callback );
-
- /**
* @brief This callback is called after the animation is finished.
* @param[in] callback The animation finished callback
*/
*/
void SetLoopingMode( DevelImageVisual::LoopingMode::Type loopingMode );
+ /**
+ * @brief Connect to this signal to be notified when the texture upload is completed.
+ * @return The signal to connect to.
+ */
+ UploadCompletedSignalType& UploadCompletedSignal();
+
protected:
/**
std::string mUrl;
VectorAnimationRenderer mVectorRenderer;
ConditionalWait mConditionalWait;
- std::unique_ptr< EventThreadCallback > mResourceReadyTrigger;
std::unique_ptr< EventThreadCallback > mAnimationFinishedTrigger;
Vector2 mPlayRange;
PlayState mPlayState;