Commit 1ff46af9b941d59dce62b9a4ea071895d44c575b

Authored by Paul Wisbey
Committed by Gerrit Code Review
2 parents e9debea0 d33b5c5a

Merge "Remove last usage of SetImage( ResourceImage ) from examples" into devel/master

examples/motion-blur/motion-blur-example.cpp
@@ -37,20 +37,8 @@ namespace // unnamed namespace @@ -37,20 +37,8 @@ namespace // unnamed namespace
37 // Demo setup parameters 37 // Demo setup parameters
38 // 38 //
39 39
40 -//#define MULTIPLE_MOTION_BLURRED_ACTORS  
41 -#ifndef MULTIPLE_MOTION_BLURRED_ACTORS  
42 -  
43 const float MOTION_BLUR_ACTOR_WIDTH = 256; // actor size on screen 40 const float MOTION_BLUR_ACTOR_WIDTH = 256; // actor size on screen
44 const float MOTION_BLUR_ACTOR_HEIGHT = 256; // "" 41 const float MOTION_BLUR_ACTOR_HEIGHT = 256; // ""
45 -  
46 -#else //#ifndef MULTIPLE_MOTION_BLURRED_ACTORS  
47 -  
48 -const float MOTION_BLUR_ACTOR_WIDTH = 150; // actor size on screen  
49 -const float MOTION_BLUR_ACTOR_HEIGHT = 112; // ""  
50 -  
51 -#endif //#ifndef MULTIPLE_MOTION_BLURRED_ACTORS  
52 -  
53 -  
54 const unsigned int MOTION_BLUR_NUM_SAMPLES = 8; 42 const unsigned int MOTION_BLUR_NUM_SAMPLES = 8;
55 43
56 const int MOTION_BLUR_NUM_ACTOR_IMAGES = 5; 44 const int MOTION_BLUR_NUM_ACTOR_IMAGES = 5;
@@ -230,71 +218,6 @@ public: @@ -230,71 +218,6 @@ public:
230 // set actor shader to the blur one 218 // set actor shader to the blur one
231 Toolkit::SetMotionBlurProperties( mMotionBlurImageView, MOTION_BLUR_NUM_SAMPLES ); 219 Toolkit::SetMotionBlurProperties( mMotionBlurImageView, MOTION_BLUR_NUM_SAMPLES );
232 220
233 -  
234 -#ifdef MULTIPLE_MOTION_BLURRED_ACTORS  
235 -  
236 - ///////////////////////////////////////////////////////  
237 - //  
238 - // Motion blurred actor 2  
239 - //  
240 -  
241 - mMotionBlurImageView2 = ImageView::New(image);  
242 - mMotionBlurImageView2.SetParentOrigin( ParentOrigin::CENTER );  
243 - mMotionBlurImageView2.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);  
244 - mMotionBlurImageView2.SetPosition(mMotionBlurActorSize.x * 1.1f, 0.0f);  
245 - mMotionBlurImageView.Add( mMotionBlurImageView2 );  
246 -  
247 - // set actor shader to the blur one  
248 - Toolkit::SetMotionBlurProperties( mMotionBlurImageView2, MOTION_BLUR_NUM_SAMPLES );  
249 - mMotionBlurImageView2.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );  
250 -  
251 -  
252 - ///////////////////////////////////////////////////////  
253 - //  
254 - // Motion blurred actor 3  
255 - //  
256 -  
257 - mMotionBlurImageView3 = ImageView::New(image);  
258 - mMotionBlurImageView3.SetParentOrigin( ParentOrigin::CENTER );  
259 - mMotionBlurImageView3.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);  
260 - mMotionBlurImageView3.SetPosition(-mMotionBlurActorSize.x * 1.1f, 0.0f);  
261 - mMotionBlurImageView.Add( mMotionBlurImageView3 );  
262 -  
263 - // set actor shader to the blur one  
264 - Toolkit::SetMotionBlurProperties( mMotionBlurImageView3, MOTION_BLUR_NUM_SAMPLES );  
265 - mMotionBlurImageView3.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );  
266 -  
267 -  
268 - ///////////////////////////////////////////////////////  
269 - //  
270 - // Motion blurred actor 4  
271 - //  
272 -  
273 - mMotionBlurImageView4 = ImageView::New(image);  
274 - mMotionBlurImageView4.SetParentOrigin( ParentOrigin::CENTER );  
275 - mMotionBlurImageView4.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);  
276 - mMotionBlurImageView4.SetPosition(0.0f, mMotionBlurActorSize.y * 1.1f);  
277 - mMotionBlurImageView.Add( mMotionBlurImageView4 );  
278 -  
279 - // set actor shader to the blur one  
280 - Toolkit::SetMotionBlurProperties( mMotionBlurImageView4, MOTION_BLUR_NUM_SAMPLES );  
281 - mMotionBlurImageView4.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );  
282 -  
283 - ///////////////////////////////////////////////////////  
284 - //  
285 - // Motion blurred actor 5  
286 - //  
287 -  
288 - mMotionBlurImageView5 = ImageView::New(image);  
289 - mMotionBlurImageView5.SetParentOrigin( ParentOrigin::CENTER );  
290 - mMotionBlurImageView5.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);  
291 - mMotionBlurImageView5.SetPosition(0.0f, -mMotionBlurActorSize.y * 1.1f);  
292 - mMotionBlurImageView.Add( mMotionBlurImageView5 );  
293 -  
294 - // set actor shader to the blur one  
295 - Toolkit::SetMotionBlurProperties( mMotionBlurImageView5, MOTION_BLUR_NUM_SAMPLES );  
296 - mMotionBlurImageView5.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );  
297 -#endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS  
298 } 221 }
299 222
300 void Rotate( DeviceOrientation orientation ) 223 void Rotate( DeviceOrientation orientation )
@@ -494,12 +417,6 @@ public: @@ -494,12 +417,6 @@ public:
494 } 417 }
495 SetImageFittedInBox( mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGES[mCurrentImage], mMotionBlurActorSize.x, mMotionBlurActorSize.y ); 418 SetImageFittedInBox( mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGES[mCurrentImage], mMotionBlurActorSize.x, mMotionBlurActorSize.y );
496 419
497 -#ifdef MULTIPLE_MOTION_BLURRED_ACTORS  
498 - mMotionBlurImageView2.SetImage(blurImage);  
499 - mMotionBlurImageView3.SetImage(blurImage);  
500 - mMotionBlurImageView4.SetImage(blurImage);  
501 - mMotionBlurImageView5.SetImage(blurImage);  
502 -#endif  
503 } 420 }
504 421
505 422
@@ -517,13 +434,6 @@ private: @@ -517,13 +434,6 @@ private:
517 ImageView mMotionBlurImageView; 434 ImageView mMotionBlurImageView;
518 Size mMotionBlurActorSize; 435 Size mMotionBlurActorSize;
519 436
520 -#ifdef MULTIPLE_MOTION_BLURRED_ACTORS  
521 - ImageView mMotionBlurImageView2;  
522 - ImageView mMotionBlurImageView3;  
523 - ImageView mMotionBlurImageView4;  
524 - ImageView mMotionBlurImageView5;  
525 -#endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS  
526 -  
527 // animate actor to position where user taps screen 437 // animate actor to position where user taps screen
528 Animation mActorTapMovementAnimation; 438 Animation mActorTapMovementAnimation;
529 439
examples/styling/styling-application.cpp
@@ -178,7 +178,7 @@ void StylingApplication::Create( Application& application ) @@ -178,7 +178,7 @@ void StylingApplication::Create( Application& application )
178 for( int i=0; i<3; ++i ) 178 for( int i=0; i<3; ++i )
179 { 179 {
180 std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1; 180 std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1;
181 - ImageView image = ImageView::New( ResourceImage::New( images[i] ) ); 181 + ImageView image = ImageView::New( images[i] );
182 image.SetName( thumbnailName.str() ); 182 image.SetName( thumbnailName.str() );
183 image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); 183 image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
184 184
shared/utility.h
@@ -36,17 +36,6 @@ Dali::PixelData LoadPixelData( const char* imagePath, @@ -36,17 +36,6 @@ Dali::PixelData LoadPixelData( const char* imagePath,
36 return loader.GetPixelData(); 36 return loader.GetPixelData();
37 } 37 }
38 38
39 -/**  
40 - * @deprecated, dont use this anymore  
41 - */  
42 -Dali::Image LoadImage( const char* imagePath,  
43 - Dali::ImageDimensions size = Dali::ImageDimensions(),  
44 - Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT,  
45 - Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT )  
46 -{  
47 - return Dali::ResourceImage::New( imagePath, size, fittingMode, samplingMode );  
48 -}  
49 -  
50 Dali::Texture LoadTexture( const char* imagePath, 39 Dali::Texture LoadTexture( const char* imagePath,
51 Dali::ImageDimensions size = Dali::ImageDimensions(), 40 Dali::ImageDimensions size = Dali::ImageDimensions(),
52 Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT, 41 Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT,
@@ -62,23 +51,6 @@ Dali::Texture LoadTexture( const char* imagePath, @@ -62,23 +51,6 @@ Dali::Texture LoadTexture( const char* imagePath,
62 return texture; 51 return texture;
63 } 52 }
64 53
65 -/**  
66 - * @brief Load an bitmap resource.  
67 - * @deprecated, dont use this anymore  
68 - *  
69 - * If it is required to scaled-down to no more than the stage dimensions,  
70 - * uses image scaling mode FittingMode::SCALE_TO_FILL to resize the image at  
71 - * load time to cover the entire stage with pixels with no borders,  
72 - * and filter mode BOX_THEN_LINEAR to sample the image with  
73 - * maximum quality.  
74 - */  
75 -  
76 -Dali::Image LoadStageFillingImage( const char* imagePath )  
77 -{  
78 - Dali::Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();  
79 - return LoadImage( imagePath, Dali::ImageDimensions( stageSize.x, stageSize.y ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR );  
80 -}  
81 -  
82 Dali::Texture LoadStageFillingTexture( const char* imagePath ) 54 Dali::Texture LoadStageFillingTexture( const char* imagePath )
83 { 55 {
84 Dali::Vector2 stageSize = Dali::Stage::GetCurrent().GetSize(); 56 Dali::Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();