X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-vector-animation-renderer.cpp;h=fbc24bf8cd401d0c4391231017d74f10e217c941;hb=5b7c9a175a97de10a004943526f07a1413b3c83c;hp=869bbc2bdbba93e6483d63cb00466156073cfff5;hpb=4527b0e4d65fdd891f57259eb1db8ca08acac219;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp index 869bbc2..fbc24bf 100755 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-vector-animation-renderer.cpp @@ -43,17 +43,26 @@ public: void SetRenderer( Dali::Renderer renderer ) { mRenderer = renderer; + + if( mWidth != 0 && mHeight != 0 ) + { + Dali::TextureSet textureSet = mRenderer.GetTextures(); + Dali::Texture texture = Dali::Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, mWidth, mHeight ); + textureSet.SetTexture( 0, texture ); + } } void SetSize( uint32_t width, uint32_t height ) { mWidth = width; mHeight = height; - } - bool StartRender() - { - return true; + if( mRenderer ) + { + Dali::TextureSet textureSet = mRenderer.GetTextures(); + Dali::Texture texture = Dali::Texture::New( TextureType::TEXTURE_2D, Pixel::RGBA8888, mWidth, mHeight ); + textureSet.SetTexture( 0, texture ); + } } void StopRender() @@ -74,13 +83,18 @@ public: return 60.0f; } + void GetDefaultSize( uint32_t& width, uint32_t& height ) const + { + width = 100; + height = 100; + } + public: std::string mUrl; Dali::Renderer mRenderer; uint32_t mWidth; uint32_t mHeight; - }; inline VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer ) @@ -147,11 +161,6 @@ void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height ) Internal::Adaptor::GetImplementation( *this ).SetSize( width, height ); } -bool VectorAnimationRenderer::StartRender() -{ - return Internal::Adaptor::GetImplementation( *this ).StartRender(); -} - void VectorAnimationRenderer::StopRender() { Internal::Adaptor::GetImplementation( *this ).StopRender(); @@ -172,5 +181,10 @@ float VectorAnimationRenderer::GetFrameRate() const return Internal::Adaptor::GetImplementation( *this ).GetFrameRate(); } +void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const +{ + Internal::Adaptor::GetImplementation( *this ).GetDefaultSize( width, height ); +} + } // namespace Dali;