X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-RendererFactory.cpp;h=dd7012d548fd62b1fdb58ce9469bbb6825dc0bdb;hb=5b4982566aba41b5e21c3b8ce3e01a7e86db8f28;hp=2d30cd8687117de25ef38fe23ec836c48751ece8;hpb=864042717041b6d9ad114b2e2f360f5f07c7682b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp b/automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp index 2d30cd8..dd7012d 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-RendererFactory.cpp @@ -531,9 +531,16 @@ int UtcDaliRendererFactoryGetImageRenderer1(void) Actor actor = Actor::New(); // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. + + const int width=512; + const int height=513; + + Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD ); + bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, width, height,width, height ); + TestControlRendererRender( application, actor, controlRenderer, 1u, - ImageDimensions(512, 513), - Integration::ResourcePointer(Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD))); + ImageDimensions(width, height), + Integration::ResourcePointer( bitmap ) ); TestGlAbstraction& gl = application.GetGlAbstraction(); int textureUnit = -1; @@ -560,9 +567,16 @@ int UtcDaliRendererFactoryGetImageRenderer2(void) Actor actor = Actor::New(); // For tesing the LoadResourceFunc is called, a big image size should be set, so the atlasing is not applied. // Image with a size smaller than 512*512 will be uploaded as a part of the atlas. + + const int width=512; + const int height=513; + + Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD ); + bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, width, height,width, height ); + TestControlRendererRender( application, actor, controlRenderer, 1u, - ImageDimensions(512, 513), - Integration::ResourcePointer(Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD)) ); + ImageDimensions(width, height), + Integration::ResourcePointer(bitmap) ); TestGlAbstraction& gl = application.GetGlAbstraction(); int textureUnit = -1; @@ -775,10 +789,13 @@ int UtcDaliRendererFactoryGetNPatchRendererN1(void) DALI_TEST_CHECK( controlRenderer ); Actor actor = Actor::New(); + //The testkit still has to load a bitmap for the broken renderer image + Integration::Bitmap* bitmap = Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD); + bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, 100, 100, 100, 100 ); TestControlRendererRender( application, actor, controlRenderer, 1u, ImageDimensions(), - Integration::ResourcePointer(Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD)) ); + Integration::ResourcePointer(bitmap) ); TestGlAbstraction& gl = application.GetGlAbstraction(); int textureUnit = -1; @@ -806,10 +823,13 @@ int UtcDaliRendererFactoryGetNPatchRendererN2(void) DALI_TEST_CHECK( controlRenderer ); Actor actor = Actor::New(); + //The testkit still has to load a bitmap for the broken renderer image + Integration::Bitmap* bitmap = Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD); + bitmap->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, 100, 100, 100, 100 ); TestControlRendererRender( application, actor, controlRenderer, 1u, ImageDimensions(), - Integration::ResourcePointer(Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_DISCARD)) ); + Integration::ResourcePointer(bitmap) ); TestGlAbstraction& gl = application.GetGlAbstraction(); int textureUnit = -1;