Fixed Image Culling test cases 42/27542/1 accepted/tizen/common/20140916.140310 submit/tizen_common/20140916.094545
authorDavid Steele <david.steele@partner.samsung.com>
Mon, 15 Sep 2014 18:00:45 +0000 (19:00 +0100)
committerDavid Steele <david.steele@partner.samsung.com>
Mon, 15 Sep 2014 18:00:45 +0000 (19:00 +0100)
With new Image::SetNaturalSize() implementation, we need to set the
closest image size in the test platform implementation for images to have size
and therefore for image actors to have size. Alternatively, could use Image::New
with non-default attributes.

Change-Id: I855c95d8654360e44cb315852ab5245465c65060
Signed-off-by: David Steele <david.steele@partner.samsung.com>
automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp
automated-tests/src/dali-internal/utc-Dali-Internal-Material.cpp

index 29af606..95edd19 100644 (file)
@@ -48,8 +48,12 @@ Image LoadImage( TestApplication& application, GLuint textureId, int width, int
   Image image;
   char* filename = NULL;
   int numChars = asprintf(&filename, "image%u.png", textureId );
+
   if( numChars > 0 )
   {
+    const Vector2 closestImageSize( width, height );
+    application.GetPlatform().SetClosestImageSize(closestImageSize);
+
     image = Image::New( filename, Image::Immediate, Image::Never );
     free (filename);
   }
index f3679cc..b4d8b85 100644 (file)
@@ -198,6 +198,8 @@ Internal::ResourceTicketPtr CheckLoadBitmap(TestApplication& application, const
 
 Internal::ImagePtr LoadImage(TestApplication& application, const char* name)
 {
+  const Vector2 closestImageSize( 80, 80);
+  application.GetPlatform().SetClosestImageSize(closestImageSize);
   Internal::ImagePtr image = Internal::Image::New(name, Dali::ImageAttributes::DEFAULT_ATTRIBUTES );
   application.SendNotification(); // Flush update messages
   application.Render();           // Process resource request