fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" );
fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHebrewRegular.ttf" );
fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansArabicRegular.ttf" );
+ fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansHindiRegular.ttf" );
// 1) Create the model.
LogicalModelPtr logicalModel;
tet_result(TET_PASS);
END_TEST;
}
+
+int UtcDaliTextLayoutGetGlyphMetrics(void)
+{
+ tet_infoline(" UtcDaliTextLayoutGetGlyphMetrics");
+
+ // Test retrieving metrics from group of characters
+
+ const std::string fontFamily( "TizenSansHindi" );
+
+ // Set a known font description
+ FontDescriptionRun fontDescriptionRun01;
+ fontDescriptionRun01.characterRun.characterIndex = 0u;
+ fontDescriptionRun01.characterRun.numberOfCharacters = 2u;
+ fontDescriptionRun01.familyLength = fontFamily.size();
+ fontDescriptionRun01.familyName = new char[fontDescriptionRun01.familyLength];
+ memcpy( fontDescriptionRun01.familyName, fontFamily.c_str(), fontDescriptionRun01.familyLength );
+ fontDescriptionRun01.familyDefined = true;
+ fontDescriptionRun01.weightDefined = false;
+ fontDescriptionRun01.widthDefined = false;
+ fontDescriptionRun01.slantDefined = false;
+ fontDescriptionRun01.sizeDefined = false;
+
+ // Set a known font description
+ FontDescriptionRun fontDescriptionRun02;
+ fontDescriptionRun02.characterRun.characterIndex = 0u;
+ fontDescriptionRun02.characterRun.numberOfCharacters = 2u;
+ fontDescriptionRun02.familyLength = fontFamily.size();
+ fontDescriptionRun02.familyName = new char[fontDescriptionRun02.familyLength];
+ memcpy( fontDescriptionRun02.familyName, fontFamily.c_str(), fontDescriptionRun02.familyLength );
+ fontDescriptionRun02.familyDefined = true;
+ fontDescriptionRun02.weightDefined = false;
+ fontDescriptionRun02.widthDefined = false;
+ fontDescriptionRun02.slantDefined = false;
+ fontDescriptionRun02.sizeDefined = false;
+
+ // Set a known font description
+ FontDescriptionRun fontDescriptionRun03;
+ fontDescriptionRun03.characterRun.characterIndex = 0u;
+ fontDescriptionRun03.characterRun.numberOfCharacters = 2u;
+ fontDescriptionRun03.familyLength = fontFamily.size();
+ fontDescriptionRun03.familyName = new char[fontDescriptionRun03.familyLength];
+ memcpy( fontDescriptionRun03.familyName, fontFamily.c_str(), fontDescriptionRun03.familyLength );
+ fontDescriptionRun03.familyDefined = true;
+ fontDescriptionRun03.weightDefined = false;
+ fontDescriptionRun03.widthDefined = false;
+ fontDescriptionRun03.slantDefined = false;
+ fontDescriptionRun03.sizeDefined = false;
+
+ Vector<FontDescriptionRun> fontDescriptionRuns01;
+ fontDescriptionRuns01.PushBack( fontDescriptionRun01 );
+
+ Vector<FontDescriptionRun> fontDescriptionRuns02;
+ fontDescriptionRuns02.PushBack( fontDescriptionRun02 );
+
+ Vector<FontDescriptionRun> fontDescriptionRuns03;
+ fontDescriptionRuns03.PushBack( fontDescriptionRun03 );
+
+ // Set a text area.
+ Size textArea(100.f, 100.f);
+
+
+ // Group: second glyph doesn't exceed the width of the first glyph
+ float positions01[] = { 0.f, -11.f };
+
+ struct LineRun line01 =
+ {
+ { 0u, 1u },
+ { 0u, 1u },
+ 11.f,
+ 15.f,
+ -4.f,
+ 0.f,
+ 0.f,
+ 0.f,
+ false,
+ false
+ };
+ Vector<LineRun> lines01;
+ lines01.PushBack( line01 );
+
+ Size layoutSize01 = Vector2(11.f, 19.f);
+
+ // Group: second glyph doesn't exceed the width of the first glyph
+ float positions02[] = { 0.f, -11.f , 7.f, -15.f };
+
+ struct LineRun line02 =
+ {
+ { 0u, 2u },
+ { 0u, 2u },
+ 15.f,
+ 15.f,
+ -4.f,
+ 0.f,
+ 0.f,
+ 0.f,
+ false,
+ false
+ };
+ Vector<LineRun> lines02;
+ lines02.PushBack( line02 );
+
+ Size layoutSize02 = Vector2(15.f, 19.f);
+
+ // Group: second glyph doesn't exceed the width of the first glyph
+ float positions03[] = { 0.f, -11.f , 2.f, -15.f };
+
+ struct LineRun line03 =
+ {
+ { 0u, 2u },
+ { 0u, 2u },
+ 11.f,
+ 15.f,
+ -4.f,
+ 0.f,
+ 0.f,
+ 0.f,
+ false,
+ false
+ };
+ Vector<LineRun> lines03;
+ lines03.PushBack( line03 );
+
+ Size layoutSize03 = Vector2(11.f, 19.f);
+
+ /////////////////////////////
+
+ struct LayoutTextData data[] =
+ {
+ {
+ "Single glyph",
+ "प",
+ textArea,
+ 1u,
+ fontDescriptionRuns01.Begin(),
+ layoutSize01,
+ 1u,
+ positions01,
+ 1u,
+ lines01.Begin(),
+ Layout::Engine::SINGLE_LINE_BOX,
+ 0u,
+ 1u,
+ false,
+ true
+ },
+ {
+ "Group: second glyph exceeds the width of the first glyph",
+ "पो",
+ textArea,
+ 1u,
+ fontDescriptionRuns02.Begin(),
+ layoutSize02,
+ 2u,
+ positions02,
+ 1u,
+ lines02.Begin(),
+ Layout::Engine::SINGLE_LINE_BOX,
+ 0u,
+ 2u,
+ false,
+ true
+ },
+ {
+ "Group: second glyph doesn't exceed the width of the first glyph",
+ "पे",
+ textArea,
+ 1u,
+ fontDescriptionRuns03.Begin(),
+ layoutSize03,
+ 2u,
+ positions03,
+ 1u,
+ lines03.Begin(),
+ Layout::Engine::SINGLE_LINE_BOX,
+ 0u,
+ 2u,
+ false,
+ true
+ }
+ };
+ const unsigned int numberOfTests = sizeof(data)/sizeof(LayoutTextData);
+
+ for( unsigned int index = 0u; index < numberOfTests; ++index )
+ {
+ ToolkitTestApplication application;
+ if( !LayoutTextTest( data[index] ) )
+ {
+ tet_result(TET_FAIL);
+ }
+ }
+
+ tet_result(TET_PASS);
+ END_TEST;
+}
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
: mUrl( url ),
mRenderer(),
mWidth( 0 ),
- mHeight( 0 )
+ mHeight( 0 ),
+ mPreviousFrame( 0 )
{
}
{
}
- void Render( uint32_t frameNumber )
+ bool Render( uint32_t frameNumber )
{
+ if( frameNumber == 1 && mPreviousFrame != frameNumber )
+ {
+ mPreviousFrame = frameNumber;
+ // For test corverage
+ return false;
+ }
+ mPreviousFrame = frameNumber;
+ return true;
}
uint32_t GetTotalFrameNumber() const
Dali::Renderer mRenderer;
uint32_t mWidth;
uint32_t mHeight;
+ uint32_t mPreviousFrame;
};
inline VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer )
Internal::Adaptor::GetImplementation( *this ).StopRender();
}
-void VectorAnimationRenderer::Render( uint32_t frameNumber )
+bool VectorAnimationRenderer::Render( uint32_t frameNumber )
{
- Internal::Adaptor::GetImplementation( *this ).Render( frameNumber );
+ return Internal::Adaptor::GetImplementation( *this ).Render( frameNumber );
}
uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
#include <dali/public-api/common/stage.h>
#include <dali/public-api/object/base-object.h>
+#define DALI_WINDOW_H
+#include <dali/integration-api/adaptors/adaptor.h>
+#include <toolkit-adaptor-impl.h>
+
// INTERNAL INCLUDES
#include "test-render-surface.h"
+using AdaptorImpl = Dali::Internal::Adaptor::Adaptor;
+
namespace Dali
{
Dali::Window Window::New( PositionSize windowPosition, const std::string& name, bool isTransparent )
{
- Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, "", isTransparent );
- return Window( window );
+ return New( windowPosition, name, "", isTransparent );
}
Dali::Window Window::New(PositionSize windowPosition, const std::string& name, const std::string& className, bool isTransparent )
{
Internal::Adaptor::Window* window = Internal::Adaptor::Window::New( windowPosition, name, className, isTransparent );
+ Dali::Window newWindow = Window( window );
+ Dali::Adaptor::WindowCreatedSignalType& windowCreatedSignal = AdaptorImpl::Get().WindowCreatedSignal();
+ windowCreatedSignal.Emit( newWindow );
return Window( window );
}
return GetImplementation( window ).mScene.KeyEventSignal();
}
+KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Window window )
+{
+ return GetImplementation( window ).mScene.KeyEventGeneratedSignal();
+}
+
TouchSignalType& TouchSignal( Window window )
{
return GetImplementation( window ).mScene.TouchSignal();
{
return GetImplementation( window ).mScene.WheelEventSignal();
}
-
} // namespace DevelWindow
} // Dali
{
typedef Signal< void () > EventProcessingFinishedSignalType;
typedef Signal< void (const KeyEvent&) > KeyEventSignalType;
+typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType;
typedef Signal< void (const TouchData&) > TouchSignalType;
typedef Signal< void (const WheelEvent&) > WheelEventSignalType;
EventProcessingFinishedSignalType& EventProcessingFinishedSignal( Window window );
KeyEventSignalType& KeyEventSignal( Dali::Window window );
+KeyEventGeneratedSignalType& KeyEventGeneratedSignal( Dali::Window window );
TouchSignalType& TouchSignal( Dali::Window window );
WheelEventSignalType& WheelEventSignal( Window window );
-
}
} // namespace Dali
// Check that focus manager is a singleton
DALI_TEST_CHECK(manager == newManager);
+
END_TEST;
}
DALI_TEST_CHECK( lostActor == Control() );
END_TEST;
}
+
+int UtcDaliKeyInputFocusManagerSignalKeyInputFocusChangedforNewWindow(void)
+{
+ ToolkitTestApplication application;
+ KeyInputFocusManager manager = KeyInputFocusManager::Get();
+
+ tet_infoline(" UtcDaliKeyInputFocusManagerSignalKeyInputFocusChanged");
+
+ PushButton pushButton1 = PushButton::New();
+ PushButton pushButton2 = PushButton::New();
+
+ Window window = Window::New(PositionSize(0,0,0,0) ,"", false);
+ DALI_TEST_CHECK( window );
+
+ window.Add( pushButton1 );
+ window.Add( pushButton2 );
+
+ PushButton gainActor, lostActor;
+ KeyInputFocusChangedCallback callback( gainActor, lostActor );
+ manager.KeyInputFocusChangedSignal().Connect( &callback, &KeyInputFocusChangedCallback::Callback );
+
+ manager.SetFocus(pushButton1);
+
+ DALI_TEST_CHECK( gainActor == pushButton1 );
+ DALI_TEST_CHECK( lostActor == Control() );
+
+ gainActor.Reset();
+ lostActor.Reset();
+
+ manager.SetFocus(pushButton2);
+
+ DALI_TEST_CHECK( gainActor == pushButton2 );
+ DALI_TEST_CHECK( lostActor == pushButton1 );
+
+ gainActor.Reset();
+ lostActor.Reset();
+
+ // Removing the focus actor from the window would also result in signal emission.
+ window.Remove( pushButton1 );
+ window.Remove( pushButton2 );
+ DALI_TEST_CHECK( gainActor == Control() );
+ DALI_TEST_CHECK( lostActor == Control() );
+
+ window.Reset();
+ END_TEST;
+}
Actor mActivatedActor;
};
+class KeyEventCallback : public Dali::ConnectionTracker
+{
+public:
+ /**
+ * Constructor
+ * @param[in] returnValue Set return value of KeyEvent callback.
+ * */
+ KeyEventCallback( bool consumed )
+ : mConsumed( consumed ),
+ mIsCalled( false )
+ {
+ }
+
+ bool Callback( Control control, const KeyEvent& keyEvent )
+ {
+ mIsCalled = true;
+ return mConsumed;
+ }
+
+ void Callback( const KeyEvent& keyEvent )
+ {
+ mIsCalled = true;
+ }
+
+ bool mConsumed;
+ bool mIsCalled;
+};
+
// Used to connect to signals via the ConnectSignal Handle method
struct CallbackFunctor
{
END_TEST;
}
+int UtcDaliKeyboardFocusManagerCheckConsumedKeyEvent(void)
+{
+ ToolkitTestApplication application;
+
+ tet_infoline( "Ensure Window can't receive KeyEvent when Control already consumed it" );
+ Dali::Integration::Scene scene = application.GetScene();
+
+ KeyboardFocusManager manager = KeyboardFocusManager::Get();
+ DALI_TEST_CHECK( ! manager.GetCurrentFocusActor() );
+
+ // Create the first actor and add it to the stage
+ Control control = Control::New();
+ control.SetKeyboardFocusable(true);
+ scene.Add(control);
+
+ KeyEventCallback controlCallback( true );
+ control.KeyEventSignal().Connect( &controlCallback, &KeyEventCallback::Callback );
+
+ KeyEventCallback sceneCallback( false );
+ scene.KeyEventSignal().Connect( &sceneCallback, &KeyEventCallback::Callback );
+
+ manager.SetCurrentFocusActor( control );
+
+ // Press Any key to notice physical keyboard event is comming to KeyboardFocusManager
+ // It makes mIsFocusIndicatorEnabled true and add focus indicator to focused actor.
+ Integration::KeyEvent event1( "Right", "", "", 0, 0, 0, Integration::KeyEvent::Down, "", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ application.ProcessEvent(event1);
+
+ DALI_TEST_CHECK( controlCallback.mIsCalled );
+ DALI_TEST_CHECK( !sceneCallback.mIsCalled );
+
+ END_TEST;
+}
/**
* @brief Query whether alpha is pre-multiplied.
*
- * @return True is alpha is pre-multiplied, false otherwise.
+ * @return True if alpha is pre-multiplied, false otherwise.
*/
bool IsPreMultipliedAlphaEnabled() const;
#include <dali/public-api/actors/layer.h>
#include <dali/public-api/common/stage.h>
#include <dali/devel-api/common/stage-devel.h>
+#include <dali/devel-api/adaptor-framework/window-devel.h>
+#include <dali/integration-api/adaptors/adaptor.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
: mSlotDelegate( this ),
mCurrentFocusControl()
{
- DevelStage::KeyEventGeneratedSignal( Stage::GetCurrent() ).Connect(mSlotDelegate, &KeyInputFocusManager::OnKeyEvent);
+ // Retrieve all the existing widnows
+ Dali::WindowContainer windows = Adaptor::Get().GetWindows();
+ for ( auto iter = windows.begin(); iter != windows.end(); ++iter )
+ {
+ DevelWindow::KeyEventGeneratedSignal( *iter ).Connect( mSlotDelegate, &KeyInputFocusManager::OnKeyEvent);
+ }
+
+ // Get notified when any new window is created afterwards
+ Adaptor::Get().WindowCreatedSignal().Connect( mSlotDelegate, &KeyInputFocusManager::OnWindowCreated);
}
KeyInputFocusManager::~KeyInputFocusManager()
{
}
+void KeyInputFocusManager::OnWindowCreated( Dali::Window& window )
+{
+ DevelWindow::KeyEventGeneratedSignal( window ).Connect( mSlotDelegate, &KeyInputFocusManager::OnKeyEvent);
+}
+
void KeyInputFocusManager::SetFocus( Toolkit::Control control )
{
if( !control )
namespace Dali
{
+class Window;
+
namespace Toolkit
{
virtual ~KeyInputFocusManager();
private:
+ /**
+ * This will be called when a new window is created
+ * @param window The new window
+ */
+ void OnWindowCreated( Dali::Window& window );
/**
* Callback for the key event when no actor in the stage has gained the key input focus
glyphMetrics.fontId = firstGlyph.fontId;
glyphMetrics.fontHeight = fontMetrics.height;
- glyphMetrics.width = firstGlyph.width + ( ( firstGlyph.isItalicRequired && !isItalicFont ) ? static_cast<unsigned int>( TextAbstraction::FontClient::DEFAULT_ITALIC_ANGLE * static_cast<float>( firstGlyph.height ) ) : 0u );
+ glyphMetrics.width = firstGlyph.width;
glyphMetrics.advance = firstGlyph.advance;
glyphMetrics.ascender = fontMetrics.ascender;
glyphMetrics.xBearing = firstGlyph.xBearing;
if( 1u < numberOfGlyphs )
{
- const float widthInit = firstGlyph.xBearing;
+ float maxWidthEdge = firstGlyph.xBearing + firstGlyph.width;
for( unsigned int i = 1u; i < numberOfGlyphs; ++i )
{
const GlyphInfo& glyphInfo = *( glyphsBuffer + glyphIndex + i );
- glyphMetrics.width = glyphMetrics.advance + glyphInfo.xBearing + glyphInfo.width + ( ( firstGlyph.isItalicRequired && !isItalicFont ) ? static_cast<unsigned int>( TextAbstraction::FontClient::DEFAULT_ITALIC_ANGLE * static_cast<float>( firstGlyph.height ) ) : 0u );
- glyphMetrics.advance += glyphInfo.advance;
+ // update the initial xBearing if smaller.
+ glyphMetrics.xBearing = std::min( glyphMetrics.xBearing, glyphMetrics.advance + glyphInfo.xBearing );
+
+ // update the max width edge if bigger.
+ const float currentMaxGlyphWidthEdge = glyphMetrics.advance + glyphInfo.xBearing + glyphInfo.width;
+ maxWidthEdge = std::max( maxWidthEdge, currentMaxGlyphWidthEdge );
+ glyphMetrics.advance += glyphInfo.advance;
}
- glyphMetrics.width -= widthInit;
+ glyphMetrics.width = maxWidthEdge - glyphMetrics.xBearing;
}
+
+ glyphMetrics.width += ( firstGlyph.isItalicRequired && !isItalicFont ) ? TextAbstraction::FontClient::DEFAULT_ITALIC_ANGLE * firstGlyph.height : 0.f;
}
} // namespace Text
FontId fontId; ///< The font id of the glyphs.
float fontHeight; ///< The font's height of those glyphs.
- float width; ///< The sum of all the widths of all the glyphs.
+ float width; ///< The width of the group.
float advance; ///< The sum of all the advances of all the glyphs.
float ascender; ///< The font's ascender.
- float xBearing; ///< The x bearing of the first glyph.
+ float xBearing; ///< The x bearing of the group.
};
/**
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
mPlacementActor = actor;
mVectorRasterizeThread.SetRenderer( mImpl->mRenderer );
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOnStage [%p]\n", this );
}
void AnimatedVectorImageVisual::DoSetOffStage( Actor& actor )
// Reset the visual size to zero so that when adding the actor back to stage the rasterization is forced
mVisualSize = Vector2::ZERO;
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::DoSetOffStage [%p]\n", this );
}
void AnimatedVectorImageVisual::OnSetTransform()
if( IsOnStage() )
{
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: width = %f, height = %f\n", visualSize.width, visualSize.height );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnSetTransform: width = %f, height = %f [%p]\n", visualSize.width, visualSize.height, this );
if( visualSize != mVisualSize )
{
{
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 );
mPlacementActor.Reset();
ResourceReady( Toolkit::Visual::ResourceStatus::READY );
+
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnResourceReady: Renderer is added [%p]\n", this );
}
}
mVectorRenderer.StopRender();
}
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::~VectorRasterizeThread: Join\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::~VectorRasterizeThread: Join [%p]\n", this );
Join();
}
Rasterize();
}
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Run: End of thread\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Run: End of thread [%p]\n", this );
}
void VectorRasterizeThread::SetRenderer( Renderer renderer )
mVectorRenderer.SetRenderer( renderer );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetRenderer\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetRenderer [%p]\n", this );
}
void VectorRasterizeThread::SetSize( uint32_t width, uint32_t height )
mResourceReady = false;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetSize: width = %d, height = %d\n", width, height );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetSize: width = %d, height = %d [%p]\n", width, height, this );
}
}
mPlayState = PlayState::PLAYING;
mConditionalWait.Notify( lock );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::PlayAnimation: Play\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::PlayAnimation: Play [%p]\n", this );
}
}
mPlayState = PlayState::STOPPING;
mConditionalWait.Notify( lock );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StopAnimation: Stop\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::StopAnimation: Stop [%p]\n", this );
}
}
{
mPlayState = PlayState::PAUSED;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::PauseAnimation: Pause\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::PauseAnimation: Pause [%p]\n", this );
}
}
mNeedRender = true;
mConditionalWait.Notify( lock );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::RenderFrame: Render\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::RenderFrame: Render [%p]\n", this );
}
}
mLoopCount = count;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetLoopCount: [%d]\n", count );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetLoopCount: [%d] [%p]\n", count, this );
}
}
mResourceReady = false;
}
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetPlayRangeInFrame: [%d, %d]\n", mStartFrame, mEndFrame );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetPlayRange: [%d, %d] [%p]\n", mStartFrame, mEndFrame, this );
}
}
}
mResourceReady = false;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetCurrentFrameNumber: frame number = %d\n", mCurrentFrame );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetCurrentFrameNumber: frame number = %d [%p]\n", mCurrentFrame, this );
}
else
{
ConditionalWait::ScopedLock lock( mConditionalWait );
mStopBehavior = stopBehavior;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetStopBehavior: stop behavor = %d\n", mStopBehavior );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetStopBehavior: stop behavor = %d [%p]\n", mStopBehavior, this );
}
void VectorRasterizeThread::SetLoopingMode( DevelImageVisual::LoopingMode::Type loopingMode )
ConditionalWait::ScopedLock lock( mConditionalWait );
mLoopingMode = loopingMode;
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetLoopingMode: looping mode = %d\n", mLoopingMode );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::SetLoopingMode: looping mode = %d [%p]\n", mLoopingMode, this );
}
void VectorRasterizeThread::Initialize()
SetSize( width, height );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Initialize: file = %s [%d frames, %f fps]\n", mUrl.c_str(), mTotalFrame, mFrameRate );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Initialize: file = %s [%d frames, %f fps] [%p]\n", mUrl.c_str(), mTotalFrame, mFrameRate, this );
}
void VectorRasterizeThread::Rasterize()
if( ( mPlayState == PlayState::PAUSED || mPlayState == PlayState::STOPPED ) && !mNeedRender && !mDestroyThread )
{
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Wait\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Wait [%p]\n", this );
mConditionalWait.Wait( lock );
}
}
// Rasterize
- mVectorRenderer.Render( currentFrame );
+ if( !mVectorRenderer.Render( currentFrame ) )
+ {
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Rendering failed. Try again later.[%d] [%p]\n", currentFrame, this );
+ mUpdateFrameNumber = false;
+ }
if( !resourceReady )
{
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Resource ready trigger\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Resource ready trigger [%p]\n", this );
mResourceReadyTrigger->Trigger();
}
// Animation is finished
mAnimationFinishedTrigger->Trigger();
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Animation is finished\n" );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: Animation is finished [%p]\n", this );
}
auto timeToSleepUntil = currentFrameStartTime + std::chrono::nanoseconds( mFrameDurationNanoSeconds );
#if defined(DEBUG_ENABLED)
auto sleepDuration = std::chrono::duration_cast< std::chrono::milliseconds >( timeToSleepUntil - std::chrono::system_clock::now() );
- DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: [current = %d, sleep duration = %lld]\n", currentFrame, sleepDuration.count() );
+ DALI_LOG_INFO( gVectorAnimationLogFilter, Debug::Verbose, "VectorRasterizeThread::Rasterize: [current = %d, sleep duration = %lld] [%p]\n", currentFrame, sleepDuration.count(), this );
#endif
std::this_thread::sleep_until( timeToSleepUntil );
const unsigned int TOOLKIT_MAJOR_VERSION = 1;
const unsigned int TOOLKIT_MINOR_VERSION = 4;
-const unsigned int TOOLKIT_MICRO_VERSION = 32;
+const unsigned int TOOLKIT_MICRO_VERSION = 33;
const char * const TOOLKIT_BUILD_DATE = __DATE__ " " __TIME__;
#ifdef DEBUG_ENABLED
Name: dali-toolkit
Summary: Dali 3D engine Toolkit
-Version: 1.4.32
+Version: 1.4.33
Release: 1
Group: System/Libraries
License: Apache-2.0 and BSD-3-Clause and MIT