From: David Steele Date: Mon, 15 Sep 2014 18:00:45 +0000 (+0100) Subject: Fixed Image Culling test cases X-Git-Tag: accepted/tizen/common/20140916.140310^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2710a63f4a4f1169ab370ef8f955cccf48a80bc3;p=platform%2Fcore%2Fuifw%2Fdali-core.git Fixed Image Culling test cases 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 --- diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp index 29af606..95edd19 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-Image-Culling.cpp @@ -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); } diff --git a/automated-tests/src/dali-internal/utc-Dali-Internal-Material.cpp b/automated-tests/src/dali-internal/utc-Dali-Internal-Material.cpp index f3679cc..b4d8b85 100644 --- a/automated-tests/src/dali-internal/utc-Dali-Internal-Material.cpp +++ b/automated-tests/src/dali-internal/utc-Dali-Internal-Material.cpp @@ -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