Commit 6501ecf527a61ef1f2e9fe424ffc43069937cd83

Authored by Kingsley Stephens
1 parent b0038846

Speed up Dali Demo loading by removing redundant table resize on image load

Change-Id: I52ea6a18647e5dfe3901f433fc6981080a5fcef6
demo/dali-table-view.cpp
... ... @@ -277,6 +277,8 @@ void DaliTableView::Initialize( Application& application )
277 277  
278 278 // Add logo
279 279 mLogo = CreateLogo( LOGO_PATH );
  280 + mRootActor.SetFixedHeight( 1, mLogo.GetImage().GetHeight() + LOGO_BOTTOM_PADDING_HEIGHT );
  281 +
280 282 Alignment alignment = Alignment::New();
281 283 alignment.Add(mLogo);
282 284 mRootActor.AddChild( alignment, TableView::CellPosition( 1, 0 ) );
... ... @@ -920,8 +922,6 @@ void DaliTableView::GenerateCircle( const Size& size, std::vector< unsigned char
920 922 ImageActor DaliTableView::CreateLogo( std::string imagePath )
921 923 {
922 924 Image image = Image::New( imagePath );
923   - image.LoadingFinishedSignal().Connect( this, &DaliTableView::OnLogoLoaded );
924   -
925 925 ImageActor logo = ImageActor::New( image );
926 926  
927 927 logo.SetAnchorPoint( AnchorPoint::CENTER );
... ... @@ -930,11 +930,6 @@ ImageActor DaliTableView::CreateLogo( std::string imagePath )
930 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 933 bool DaliTableView::PauseBackgroundAnimation()
939 934 {
940 935 PauseAnimation();
... ...
demo/dali-table-view.h
... ... @@ -327,13 +327,6 @@ private: // Application callbacks & implementation
327 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 330 * Timer handler for ending background animation
338 331 *
339 332 * @return Return value for timer handler
... ...