Commit 4eb15acbd1c594960e5ba0248c57bf944e6e611b

Authored by Adeel Kazmi
2 parents c1b652f2 2671cc81

[dali_1.4.23] Merge branch 'devel/master'

Change-Id: I2d3aa0cc4f80ddc5a90e704aba92c6b0d63756b1
examples/image-view-url/image-view-url-example.cpp
@@ -57,8 +57,9 @@ const Vector2 TARGET_SIZE(800.f, 800.f); @@ -57,8 +57,9 @@ const Vector2 TARGET_SIZE(800.f, 800.f);
57 class ImageViewUrlApp : public ConnectionTracker 57 class ImageViewUrlApp : public ConnectionTracker
58 { 58 {
59 public: 59 public:
60 - ImageViewUrlApp( Application& application ) 60 + ImageViewUrlApp( Application& application, std::string url )
61 : mApplication( application ), 61 : mApplication( application ),
  62 + mUrl( url ),
62 mDeltaPropertyIndex( Property::INVALID_INDEX ) 63 mDeltaPropertyIndex( Property::INVALID_INDEX )
63 { 64 {
64 // Connect to the Application's Init signal 65 // Connect to the Application's Init signal
@@ -95,11 +96,17 @@ private: @@ -95,11 +96,17 @@ private:
95 Toolkit::Alignment::HorizontalRight, 96 Toolkit::Alignment::HorizontalRight,
96 DemoHelper::DEFAULT_MODE_SWITCH_PADDING ); 97 DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
97 98
98 - CreateRenderTask( ); 99 + std::string url = mUrl;
  100 + if( url.empty() )
  101 + {
  102 + url = BIG_TEST_IMAGE;
  103 + }
  104 +
  105 + CreateRenderTask( url );
99 CreateScene( ); 106 CreateScene( );
100 } 107 }
101 108
102 - void CreateRenderTask() 109 + void CreateRenderTask( const std::string& url )
103 { 110 {
104 auto rootActor = Stage::GetCurrent().GetRootLayer(); 111 auto rootActor = Stage::GetCurrent().GetRootLayer();
105 112
@@ -110,7 +117,7 @@ private: @@ -110,7 +117,7 @@ private:
110 117
111 { 118 {
112 // create actor to render input with applied shader 119 // create actor to render input with applied shader
113 - mActorForInput = Toolkit::ImageView::New(BIG_TEST_IMAGE); 120 + mActorForInput = Toolkit::ImageView::New( url );
114 mActorForInput.SetParentOrigin(ParentOrigin::CENTER); 121 mActorForInput.SetParentOrigin(ParentOrigin::CENTER);
115 mActorForInput.SetSize(TARGET_SIZE); 122 mActorForInput.SetSize(TARGET_SIZE);
116 Property::Map customShader; 123 Property::Map customShader;
@@ -191,6 +198,7 @@ private: @@ -191,6 +198,7 @@ private:
191 198
192 private: 199 private:
193 Application& mApplication; 200 Application& mApplication;
  201 + std::string mUrl;
194 Layer mContent; 202 Layer mContent;
195 Toolkit::ImageView mImageView; 203 Toolkit::ImageView mImageView;
196 Animation mAnimation; 204 Animation mAnimation;
@@ -202,7 +210,14 @@ private: @@ -202,7 +210,14 @@ private:
202 int DALI_EXPORT_API main( int argc, char **argv ) 210 int DALI_EXPORT_API main( int argc, char **argv )
203 { 211 {
204 Application application = Application::New( &argc, &argv ); 212 Application application = Application::New( &argc, &argv );
205 - ImageViewUrlApp test( application ); 213 +
  214 + std::string url;
  215 + if( argc > 1 )
  216 + {
  217 + url = argv[1];
  218 + }
  219 +
  220 + ImageViewUrlApp test( application, url );
206 application.MainLoop(); 221 application.MainLoop();
207 return 0; 222 return 0;
208 } 223 }
packaging/com.samsung.dali-demo.spec
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 Name: com.samsung.dali-demo 3 Name: com.samsung.dali-demo
4 Summary: The OpenGLES Canvas Core Demo 4 Summary: The OpenGLES Canvas Core Demo
5 -Version: 1.4.22 5 +Version: 1.4.23
6 Release: 1 6 Release: 1
7 Group: System/Libraries 7 Group: System/Libraries
8 License: Apache-2.0 8 License: Apache-2.0