X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-adaptor%2Futc-Dali-PixelBuffer.cpp;h=99584720af22956df11652b3b2158f892db51514;hb=afe08dc50446f00bb0f78439960be465bcb2e7aa;hp=47d313861cb272c1cfc418d4a823e1964a2d0371;hpb=f32f04052accfe880a9141d554091d4cfe922d47;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/automated-tests/src/dali-adaptor/utc-Dali-PixelBuffer.cpp b/automated-tests/src/dali-adaptor/utc-Dali-PixelBuffer.cpp index 47d3138..9958472 100644 --- a/automated-tests/src/dali-adaptor/utc-Dali-PixelBuffer.cpp +++ b/automated-tests/src/dali-adaptor/utc-Dali-PixelBuffer.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include #include +#include #include #include "mesh-builder.h" using namespace Dali; @@ -34,221 +34,219 @@ int UtcDaliPixelBufferCreatePixelData(void) { TestApplication application; - unsigned int width = 20u; - unsigned int height = 20u; - Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGB888 ); + unsigned int width = 20u; + unsigned int height = 20u; + Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGB888); PixelData pixelData = imageData.CreatePixelData(); - DALI_TEST_EQUALS( true, (bool)pixelData, TEST_LOCATION ); + DALI_TEST_EQUALS(true, (bool)pixelData, TEST_LOCATION); END_TEST; } - -void Mask1stQuadrant( Devel::PixelBuffer maskData ) +void Mask1stQuadrant(Devel::PixelBuffer maskData) { - int width = maskData.GetWidth(); - int height = maskData.GetHeight(); + int width = maskData.GetWidth(); + int height = maskData.GetHeight(); Pixel::Format pixelFormat = maskData.GetPixelFormat(); - int bpp = Pixel::GetBytesPerPixel(pixelFormat); + int bpp = Pixel::GetBytesPerPixel(pixelFormat); unsigned char* maskBuffer = maskData.GetBuffer(); - memset( maskBuffer, 0, width*height*bpp ); - int offset=0; - for( int x=0; x=width/2 || y>=height/2) + if(x >= width / 2 || y >= height / 2) { - for(int b=0;b=width/4 && x<3*width/4 && - y>=height/4 && y<3*height/4 ) + if(x >= width / 4 && x < 3 * width / 4 && + y >= height / 4 && y < 3 * height / 4) { - for(int b=0;b= height/2 ) || - ( x >= width/2 && y < height/2 ) ) + if((x < width / 2 && y >= height / 2) || + (x >= width / 2 && y < height / 2)) { - for(int b=0;b