Commit 6501ecf527a61ef1f2e9fe424ffc43069937cd83
1 parent
b0038846
Speed up Dali Demo loading by removing redundant table resize on image load
Change-Id: I52ea6a18647e5dfe3901f433fc6981080a5fcef6
Showing
2 changed files
with
2 additions
and
14 deletions
demo/dali-table-view.cpp
| @@ -277,6 +277,8 @@ void DaliTableView::Initialize( Application& application ) | @@ -277,6 +277,8 @@ void DaliTableView::Initialize( Application& application ) | ||
| 277 | 277 | ||
| 278 | // Add logo | 278 | // Add logo |
| 279 | mLogo = CreateLogo( LOGO_PATH ); | 279 | mLogo = CreateLogo( LOGO_PATH ); |
| 280 | + mRootActor.SetFixedHeight( 1, mLogo.GetImage().GetHeight() + LOGO_BOTTOM_PADDING_HEIGHT ); | ||
| 281 | + | ||
| 280 | Alignment alignment = Alignment::New(); | 282 | Alignment alignment = Alignment::New(); |
| 281 | alignment.Add(mLogo); | 283 | alignment.Add(mLogo); |
| 282 | mRootActor.AddChild( alignment, TableView::CellPosition( 1, 0 ) ); | 284 | mRootActor.AddChild( alignment, TableView::CellPosition( 1, 0 ) ); |
| @@ -920,8 +922,6 @@ void DaliTableView::GenerateCircle( const Size& size, std::vector< unsigned char | @@ -920,8 +922,6 @@ void DaliTableView::GenerateCircle( const Size& size, std::vector< unsigned char | ||
| 920 | ImageActor DaliTableView::CreateLogo( std::string imagePath ) | 922 | ImageActor DaliTableView::CreateLogo( std::string imagePath ) |
| 921 | { | 923 | { |
| 922 | Image image = Image::New( imagePath ); | 924 | Image image = Image::New( imagePath ); |
| 923 | - image.LoadingFinishedSignal().Connect( this, &DaliTableView::OnLogoLoaded ); | ||
| 924 | - | ||
| 925 | ImageActor logo = ImageActor::New( image ); | 925 | ImageActor logo = ImageActor::New( image ); |
| 926 | 926 | ||
| 927 | logo.SetAnchorPoint( AnchorPoint::CENTER ); | 927 | logo.SetAnchorPoint( AnchorPoint::CENTER ); |
| @@ -930,11 +930,6 @@ ImageActor DaliTableView::CreateLogo( std::string imagePath ) | @@ -930,11 +930,6 @@ ImageActor DaliTableView::CreateLogo( std::string imagePath ) | ||
| 930 | return logo; | 930 | return logo; |
| 931 | } | 931 | } |
| 932 | 932 | ||
| 933 | -void DaliTableView::OnLogoLoaded( Dali::Image image ) | ||
| 934 | -{ | ||
| 935 | - mRootActor.SetFixedHeight( 1, image.GetHeight() + LOGO_BOTTOM_PADDING_HEIGHT ); | ||
| 936 | -} | ||
| 937 | - | ||
| 938 | bool DaliTableView::PauseBackgroundAnimation() | 933 | bool DaliTableView::PauseBackgroundAnimation() |
| 939 | { | 934 | { |
| 940 | PauseAnimation(); | 935 | PauseAnimation(); |
demo/dali-table-view.h
| @@ -327,13 +327,6 @@ private: // Application callbacks & implementation | @@ -327,13 +327,6 @@ private: // Application callbacks & implementation | ||
| 327 | Dali::ImageActor CreateLogo( std::string imagePath ); | 327 | Dali::ImageActor CreateLogo( std::string imagePath ); |
| 328 | 328 | ||
| 329 | /** | 329 | /** |
| 330 | - * Callback for when the logo image is loaded | ||
| 331 | - * | ||
| 332 | - * @param[in] image The loaded logo image | ||
| 333 | - */ | ||
| 334 | - void OnLogoLoaded( Dali::Image image ); | ||
| 335 | - | ||
| 336 | - /** | ||
| 337 | * Timer handler for ending background animation | 330 | * Timer handler for ending background animation |
| 338 | * | 331 | * |
| 339 | * @return Return value for timer handler | 332 | * @return Return value for timer handler |