Formatting automated-tests
[platform/core/uifw/dali-adaptor.git] / automated-tests / src / dali-adaptor / utc-Dali-PixelBuffer.cpp
index 24a17d0..9958472 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#include <dali/dali.h>
 #include <dali-test-suite-utils.h>
+#include <dali/dali.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #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; ++x)
+  memset(maskBuffer, 0, width * height * bpp);
+  int offset = 0;
+  for(int x = 0; x < width; ++x)
   {
-    for( int y=0; y<height; ++y)
+    for(int y = 0; y < height; ++y)
     {
-      if(x>=width/2 || y>=height/2)
+      if(x >= width / 2 || y >= height / 2)
       {
-        for(int b=0;b<bpp;++b)
+        for(int b = 0; b < bpp; ++b)
         {
-          maskBuffer[offset+b] = 0xff;
+          maskBuffer[offset + b] = 0xff;
         }
       }
-      offset+=bpp;
+      offset += bpp;
     }
   }
 }
 
-void MaskCenterSquare( Devel::PixelBuffer maskData )
+void MaskCenterSquare(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 y=0; y<height; ++y)
+  memset(maskBuffer, 0, width * height * bpp);
+  int offset = 0;
+  for(int y = 0; y < height; ++y)
   {
-    for( int x=0; x<width; ++x)
+    for(int x = 0; x < width; ++x)
     {
-      if(x>=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<bpp;++b)
+        for(int b = 0; b < bpp; ++b)
         {
-          maskBuffer[offset+b] = 0xff;
+          maskBuffer[offset + b] = 0xff;
         }
       }
-      offset+=bpp;
+      offset += bpp;
     }
   }
 }
 
-void AlternateQuadrants( Devel::PixelBuffer buffer )
+void AlternateQuadrants(Devel::PixelBuffer buffer)
 {
-  int width = buffer.GetWidth();
-  int height = buffer.GetHeight();
+  int           width       = buffer.GetWidth();
+  int           height      = buffer.GetHeight();
   Pixel::Format pixelFormat = buffer.GetPixelFormat();
-  int bpp = Pixel::GetBytesPerPixel(pixelFormat);
-  int stride=width*bpp;
+  int           bpp         = Pixel::GetBytesPerPixel(pixelFormat);
+  int           stride      = width * bpp;
 
   unsigned char* pixels = buffer.GetBuffer();
-  memset( pixels, 0, width*height*bpp );
+  memset(pixels, 0, width * height * bpp);
 
-  for( int x=0; x<width; ++x)
+  for(int x = 0; x < width; ++x)
   {
-    for( int y=0; y<height; ++y)
+    for(int y = 0; y < height; ++y)
     {
-      if( ( x < width/2 && y >= 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<bpp;++b)
+        for(int b = 0; b < bpp; ++b)
         {
-          pixels[y*stride+x*bpp+b] = 0xff;
+          pixels[y * stride + x * bpp + b] = 0xff;
         }
       }
     }
   }
 }
 
-
-void FillCheckerboard( Devel::PixelBuffer imageData )
+void FillCheckerboard(Devel::PixelBuffer imageData)
 {
-  int width = imageData.GetWidth();
-  int height = imageData.GetHeight();
+  int           width       = imageData.GetWidth();
+  int           height      = imageData.GetHeight();
   Pixel::Format pixelFormat = imageData.GetPixelFormat();
-  int bpp = Pixel::GetBytesPerPixel(pixelFormat);
+  int           bpp         = Pixel::GetBytesPerPixel(pixelFormat);
 
   unsigned char* imageBuffer = imageData.GetBuffer();
-  memset( imageBuffer, 0, width*height*bpp );
-  int offset=0;
-  for( int x=0; x<width; ++x)
+  memset(imageBuffer, 0, width * height * bpp);
+  int offset = 0;
+  for(int x = 0; x < width; ++x)
   {
-    for( int y=0; y<height; ++y)
+    for(int y = 0; y < height; ++y)
     {
       // on even lines, odd pixels, or on odd lines, even pixels
-      if( (x%2 && y%2==0) || (x%2==0 && y%2) )
+      if((x % 2 && y % 2 == 0) || (x % 2 == 0 && y % 2))
       {
         switch(pixelFormat)
         {
           case Pixel::RGBA5551:
-            imageBuffer[offset] = 0xFF;
-            imageBuffer[offset+1] = 0xFF;
+            imageBuffer[offset]     = 0xFF;
+            imageBuffer[offset + 1] = 0xFF;
             break;
           case Pixel::RGBA4444:
-            imageBuffer[offset] = 0xFF;
-            imageBuffer[offset+1] = 0xFF;
+            imageBuffer[offset]     = 0xFF;
+            imageBuffer[offset + 1] = 0xFF;
             break;
           case Pixel::RGB565:
-            imageBuffer[offset] = 0xFF;
-            imageBuffer[offset+1] = 0xFF;
+            imageBuffer[offset]     = 0xFF;
+            imageBuffer[offset + 1] = 0xFF;
             break;
           case Pixel::RGB888:
-            imageBuffer[offset] = 0xFF;
-            imageBuffer[offset+1] = 0xFF;
-            imageBuffer[offset+2] = 0xFF;
+            imageBuffer[offset]     = 0xFF;
+            imageBuffer[offset + 1] = 0xFF;
+            imageBuffer[offset + 2] = 0xFF;
             break;
           case Pixel::RGBA8888:
-            imageBuffer[offset] = 0xFF;
-            imageBuffer[offset+1] = 0xFF;
-            imageBuffer[offset+2] = 0xFF;
-            imageBuffer[offset+3] = 0xFF;
+            imageBuffer[offset]     = 0xFF;
+            imageBuffer[offset + 1] = 0xFF;
+            imageBuffer[offset + 2] = 0xFF;
+            imageBuffer[offset + 3] = 0xFF;
             break;
           default:
             break;
         }
       }
-      offset+=bpp;
+      offset += bpp;
     }
   }
 }
 
-int GetAlphaAt( Devel::PixelBuffer buffer, int x, int y )
+int GetAlphaAt(Devel::PixelBuffer buffer, int x, int y)
 {
   unsigned char* pixels = buffer.GetBuffer();
-  int bpp = Pixel::GetBytesPerPixel(buffer.GetPixelFormat());
-  int stride = buffer.GetWidth() * bpp;
-  int byteOffset;
-  int bitMask;
-  GetAlphaOffsetAndMask( buffer.GetPixelFormat(), byteOffset, bitMask );
-  return int(pixels[stride * y + x*bpp + byteOffset])  & bitMask;
+  int            bpp    = Pixel::GetBytesPerPixel(buffer.GetPixelFormat());
+  int            stride = buffer.GetWidth() * bpp;
+  int            byteOffset;
+  int            bitMask;
+  GetAlphaOffsetAndMask(buffer.GetPixelFormat(), byteOffset, bitMask);
+  return int(pixels[stride * y + x * bpp + byteOffset]) & bitMask;
 }
 
 int UtcDaliPixelBufferNew01P(void)
 {
-  TestApplication application;
-  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New( 10, 10, Pixel::RGBA8888 );
-  DALI_TEST_CHECK( pixbuf );
-  DALI_TEST_CHECK( pixbuf.GetBuffer() != NULL );
+  TestApplication    application;
+  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New(10, 10, Pixel::RGBA8888);
+  DALI_TEST_CHECK(pixbuf);
+  DALI_TEST_CHECK(pixbuf.GetBuffer() != NULL);
   END_TEST;
 }
 
 int UtcDaliPixelBufferNew01N(void)
 {
-  TestApplication application;
-  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New( 0, 0, Pixel::RGBA8888 );
-  DALI_TEST_CHECK( pixbuf );
-  DALI_TEST_CHECK( pixbuf.GetBuffer() == NULL );
+  TestApplication    application;
+  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New(0, 0, Pixel::RGBA8888);
+  DALI_TEST_CHECK(pixbuf);
+  DALI_TEST_CHECK(pixbuf.GetBuffer() == NULL);
   END_TEST;
 }
 
 int UtcDaliPixelBufferConvert(void)
 {
-  TestApplication application;
-  TestGlAbstraction& gl=application.GetGlAbstraction();
-  TraceCallStack& textureTrace=gl.GetTextureTrace();
+  TestApplication    application;
+  TestGlAbstraction& gl           = application.GetGlAbstraction();
+  TraceCallStack&    textureTrace = gl.GetTextureTrace();
   textureTrace.Enable(true);
 
-  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New( 10, 10, Pixel::RGB565 );
+  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New(10, 10, Pixel::RGB565);
   FillCheckerboard(pixbuf);
 
   {
     Devel::PixelBuffer pixbufPrime = pixbuf; // store a second handle to the data
 
-    Dali::PixelData pixelData = Devel::PixelBuffer::Convert( pixbuf );
-    DALI_TEST_CHECK( !pixbuf );
+    Dali::PixelData pixelData = Devel::PixelBuffer::Convert(pixbuf);
+    DALI_TEST_CHECK(!pixbuf);
 
     // check the buffer in the second handle is empty
-    DALI_TEST_CHECK( pixbufPrime.GetBuffer() == NULL );
+    DALI_TEST_CHECK(pixbufPrime.GetBuffer() == NULL);
 
-    DALI_TEST_CHECK( pixelData );
-    DALI_TEST_EQUALS( pixelData.GetWidth(), 10, TEST_LOCATION );
-    DALI_TEST_EQUALS( pixelData.GetHeight(), 10, TEST_LOCATION );
-    DALI_TEST_EQUALS( pixelData.GetPixelFormat(), Pixel::RGB565, TEST_LOCATION );
+    DALI_TEST_CHECK(pixelData);
+    DALI_TEST_EQUALS(pixelData.GetWidth(), 10, TEST_LOCATION);
+    DALI_TEST_EQUALS(pixelData.GetHeight(), 10, TEST_LOCATION);
+    DALI_TEST_EQUALS(pixelData.GetPixelFormat(), Pixel::RGB565, TEST_LOCATION);
 
     // Try drawing it
     Texture t = Texture::New(TextureType::TEXTURE_2D, Pixel::RGB565, 10, 10);
-    t.Upload( pixelData );
+    t.Upload(pixelData);
     TextureSet ts = TextureSet::New();
     ts.SetTexture(0, t);
     Geometry g = CreateQuadGeometry();
-    Shader s = Shader::New("v", "f");
-    Renderer r = Renderer::New( g, s );
+    Shader   s = Shader::New("v", "f");
+    Renderer r = Renderer::New(g, s);
     r.SetTextures(ts);
     Actor a = Actor::New();
     a.AddRenderer(r);
-    a.SetSize(10, 10);
-    a.SetParentOrigin(ParentOrigin::CENTER);
-    Stage::GetCurrent().Add(a);
+    a.SetProperty(Actor::Property::SIZE, Vector2(10, 10));
+    a.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
+    application.GetScene().Add(a);
 
     application.SendNotification();
     application.Render();
-    DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
+    DALI_TEST_EQUALS(textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION);
 
     // Let secondary scope destroy pixbufPrime
   }
@@ -258,110 +256,107 @@ int UtcDaliPixelBufferConvert(void)
 
 int UtcDaliPixelBufferGetWidth(void)
 {
-  TestApplication application;
-  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New( 10, 10, Pixel::RGB565 );
+  TestApplication    application;
+  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New(10, 10, Pixel::RGB565);
   FillCheckerboard(pixbuf);
 
-  DALI_TEST_EQUALS( pixbuf.GetWidth(), 10, TEST_LOCATION ) ;
+  DALI_TEST_EQUALS(pixbuf.GetWidth(), 10, TEST_LOCATION);
 
   END_TEST;
 }
 
 int UtcDaliPixelBufferGetHeight(void)
 {
-  TestApplication application;
-  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New( 10, 10, Pixel::RGB565 );
+  TestApplication    application;
+  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New(10, 10, Pixel::RGB565);
   FillCheckerboard(pixbuf);
 
-  DALI_TEST_EQUALS( pixbuf.GetHeight(), 10, TEST_LOCATION ) ;
+  DALI_TEST_EQUALS(pixbuf.GetHeight(), 10, TEST_LOCATION);
 
   END_TEST;
 }
 
 int UtcDaliPixelBufferGetPixelFormat(void)
 {
-  TestApplication application;
-  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New( 10, 10, Pixel::RGB565 );
+  TestApplication    application;
+  Devel::PixelBuffer pixbuf = Devel::PixelBuffer::New(10, 10, Pixel::RGB565);
   FillCheckerboard(pixbuf);
 
-  DALI_TEST_EQUALS( pixbuf.GetPixelFormat(), Pixel::RGB565, TEST_LOCATION ) ;
+  DALI_TEST_EQUALS(pixbuf.GetPixelFormat(), Pixel::RGB565, TEST_LOCATION);
 
   END_TEST;
 }
 
-
-
 int UtcDaliPixelBufferMask01(void)
 {
   TestApplication application;
 
-  unsigned int width = 10u;
-  unsigned int height = 10u;
-  Pixel::Format pixelFormat = Pixel::L8;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, pixelFormat );
+  unsigned int       width       = 10u;
+  unsigned int       height      = 10u;
+  Pixel::Format      pixelFormat = Pixel::L8;
+  Devel::PixelBuffer maskData    = Devel::PixelBuffer::New(width, height, pixelFormat);
 
   Mask1stQuadrant(maskData);
 
-  width = 20u;
-  height = 20u;
+  width       = 20u;
+  height      = 20u;
   pixelFormat = Pixel::RGBA5551;
 
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, pixelFormat );
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, pixelFormat);
   FillCheckerboard(imageData);
 
-  imageData.ApplyMask( maskData, 1.0f, false );
+  imageData.ApplyMask(maskData, 1.0f, false);
 
   // Test that the pixel format has been promoted to RGBA8888
-  DALI_TEST_EQUALS( imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION );
+  DALI_TEST_EQUALS(imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION);
 
   // Test that a pixel in the first quadrant has no alpha value
   unsigned char* buffer = imageData.GetBuffer();
-  DALI_TEST_EQUALS( buffer[3], 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( buffer[7], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[3], 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[7], 0x00u, TEST_LOCATION);
 
   // Test that an even pixel in the second quadrant has a full alpha value
-  DALI_TEST_EQUALS( buffer[43], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[43], 0x00u, TEST_LOCATION);
 
   // Test that an odd pixel in the second quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[47], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[47], 0xffu, TEST_LOCATION);
 
   END_TEST;
 }
 
-
 int UtcDaliPixelBufferMask02(void)
 {
   TestApplication application;
 
-  unsigned int width = 10u;
-  unsigned int height = 10u;
-  Pixel::Format pixelFormat = Pixel::L8;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, pixelFormat );
+  unsigned int       width       = 10u;
+  unsigned int       height      = 10u;
+  Pixel::Format      pixelFormat = Pixel::L8;
+  Devel::PixelBuffer maskData    = Devel::PixelBuffer::New(width, height, pixelFormat);
 
   Mask1stQuadrant(maskData);
 
-  width = 20u;
-  height = 20u;
+  width       = 20u;
+  height      = 20u;
   pixelFormat = Pixel::RGBA4444;
 
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, pixelFormat );
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, pixelFormat);
   FillCheckerboard(imageData);
 
-  imageData.ApplyMask( maskData, 1.0f, false );
+  imageData.ApplyMask(maskData, 1.0f, false);
 
   // Test that the pixel format has been promoted to RGBA8888
-  DALI_TEST_EQUALS( imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION );
+  DALI_TEST_EQUALS(imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION);
 
   // Test that a pixel in the first quadrant has no alpha value
   unsigned char* buffer = imageData.GetBuffer();
-  DALI_TEST_EQUALS( buffer[3], 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( buffer[7], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[3], 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[7], 0x00u, TEST_LOCATION);
 
   // Test that an even pixel in the second quadrant has no alpha value
-  DALI_TEST_EQUALS( buffer[43], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[43], 0x00u, TEST_LOCATION);
 
   // Test that an odd pixel in the second quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[47], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[47], 0xffu, TEST_LOCATION);
 
   END_TEST;
 }
@@ -371,67 +366,66 @@ int UtcDaliPixelBufferMask03(void)
   TestApplication application;
   tet_infoline("Test application of alpha mask to smaller RGB565 image");
 
-  unsigned int width = 20u;
-  unsigned int height = 20u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::L8 );
+  unsigned int       width    = 20u;
+  unsigned int       height   = 20u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::L8);
   Mask1stQuadrant(maskData);
 
-  width = 10u;
-  height = 10u;
-  Pixel::Format format = Pixel::RGB565;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, format );
+  width                        = 10u;
+  height                       = 10u;
+  Pixel::Format      format    = Pixel::RGB565;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, format);
   FillCheckerboard(imageData);
 
-  imageData.ApplyMask( maskData, 1.0f, false );
+  imageData.ApplyMask(maskData, 1.0f, false);
 
   // Test that the pixel format has been promoted to RGBA8888
-  DALI_TEST_EQUALS( imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION );
+  DALI_TEST_EQUALS(imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION);
 
   // Test that a pixel in the first quadrant has no alpha value
   unsigned char* buffer = imageData.GetBuffer();
-  DALI_TEST_EQUALS( buffer[3], 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( buffer[7], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[3], 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[7], 0x00u, TEST_LOCATION);
 
   // Test that an odd pixel in the fourth quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[(6*10+7)*4+3], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[(6 * 10 + 7) * 4 + 3], 0xffu, TEST_LOCATION);
 
   // Test that an even pixel in the fourth quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[(6*10+8)*4+3], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[(6 * 10 + 8) * 4 + 3], 0xffu, TEST_LOCATION);
 
   END_TEST;
 }
 
-
 int UtcDaliPixelBufferMask04(void)
 {
   TestApplication application;
   tet_infoline("Test application of alpha mask to larger RGBA8888 image");
 
-  unsigned int width = 10u;
-  unsigned int height = 10u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::L8 );
+  unsigned int       width    = 10u;
+  unsigned int       height   = 10u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::L8);
   Mask1stQuadrant(maskData);
 
-  width = 20u;
-  height = 20u;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  width                        = 20u;
+  height                       = 20u;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   FillCheckerboard(imageData);
 
-  imageData.ApplyMask( maskData, 1.0f, false );
+  imageData.ApplyMask(maskData, 1.0f, false);
 
   // Test that the pixel format has been promoted to RGBA8888
-  DALI_TEST_EQUALS( imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION );
+  DALI_TEST_EQUALS(imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION);
 
   // Test that a pixel in the first quadrant has no alpha value
   unsigned char* buffer = imageData.GetBuffer();
-  DALI_TEST_EQUALS( buffer[3], 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( buffer[7], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[3], 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[7], 0x00u, TEST_LOCATION);
 
   // Test that an even pixel in the second quadrant has no alpha value
-  DALI_TEST_EQUALS( buffer[43], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[43], 0x00u, TEST_LOCATION);
 
   // Test that an odd pixel in the second quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[47], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[47], 0xffu, TEST_LOCATION);
 
   END_TEST;
 }
@@ -441,31 +435,31 @@ int UtcDaliPixelBufferMask05(void)
   TestApplication application;
   tet_infoline("Test application of alpha mask to smaller RGBA8888 image");
 
-  unsigned int width = 20u;
-  unsigned int height = 20u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  unsigned int       width    = 20u;
+  unsigned int       height   = 20u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   Mask1stQuadrant(maskData);
 
-  width = 10u;
-  height = 10u;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  width                        = 10u;
+  height                       = 10u;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   FillCheckerboard(imageData);
 
-  imageData.ApplyMask( maskData, 1.0f, false );
+  imageData.ApplyMask(maskData, 1.0f, false);
 
   // Test that the pixel format has been promoted to RGBA8888
-  DALI_TEST_EQUALS( imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION );
+  DALI_TEST_EQUALS(imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION);
 
   // Test that a pixel in the first quadrant has no alpha value
   unsigned char* buffer = imageData.GetBuffer();
-  DALI_TEST_EQUALS( buffer[3], 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( buffer[7], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[3], 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[7], 0x00u, TEST_LOCATION);
 
   // Test that an odd pixel in the second quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[39], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[39], 0xffu, TEST_LOCATION);
 
   // Test that an even pixel in the second quadrant has no alpha value
-  DALI_TEST_EQUALS( buffer[27], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[27], 0x00u, TEST_LOCATION);
 
   END_TEST;
 }
@@ -475,44 +469,43 @@ int UtcDaliPixelBufferMask06(void)
   TestApplication application;
   tet_infoline("Test application of alpha mask to same size RGBA8888 image");
 
-  unsigned int width = 10u;
-  unsigned int height = 10u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  unsigned int       width    = 10u;
+  unsigned int       height   = 10u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   Mask1stQuadrant(maskData);
 
-  width = 10u;
-  height = 10u;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  width                        = 10u;
+  height                       = 10u;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   FillCheckerboard(imageData);
 
-  imageData.ApplyMask( maskData, 1.0f, false );
+  imageData.ApplyMask(maskData, 1.0f, false);
 
   // Test that the pixel format has been promoted to RGBA8888
-  DALI_TEST_EQUALS( imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION );
+  DALI_TEST_EQUALS(imageData.GetPixelFormat(), Pixel::RGBA8888, TEST_LOCATION);
 
   // Test that a pixel in the first quadrant has no alpha value
   unsigned char* buffer = imageData.GetBuffer();
-  DALI_TEST_EQUALS( buffer[3], 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( buffer[7], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[3], 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[7], 0x00u, TEST_LOCATION);
 
   // Test that an odd pixel in the second quadrant has full alpha value
-  DALI_TEST_EQUALS( buffer[39], 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[39], 0xffu, TEST_LOCATION);
 
   // Test that an even pixel in the second quadrant has no alpha value
-  DALI_TEST_EQUALS( buffer[27], 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(buffer[27], 0x00u, TEST_LOCATION);
 
   END_TEST;
 }
 
-
 int UtcDaliPixelBufferMask07(void)
 {
   TestApplication application;
-  tet_infoline("Test scaling of source image to match alpha mask" );
+  tet_infoline("Test scaling of source image to match alpha mask");
 
-  unsigned int width = 20u;
-  unsigned int height = 20u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  unsigned int       width    = 20u;
+  unsigned int       height   = 20u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   MaskCenterSquare(maskData);
 
   // +----------+
@@ -522,10 +515,10 @@ int UtcDaliPixelBufferMask07(void)
   // |  XXXXXX  |
   // *----------+
 
-  width = 10u;
-  height = 10u;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
-  AlternateQuadrants( imageData );
+  width                        = 10u;
+  height                       = 10u;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
+  AlternateQuadrants(imageData);
 
   // +-----XXXXX+
   // |     XXXXX|
@@ -534,7 +527,7 @@ int UtcDaliPixelBufferMask07(void)
   // |XXXXX     |
   // *XXXXX-----+
 
-  imageData.ApplyMask( maskData, 2.0f, true );
+  imageData.ApplyMask(maskData, 2.0f, true);
 
   // +----------+
   // |     XXX  |
@@ -543,36 +536,36 @@ int UtcDaliPixelBufferMask07(void)
   // |  XXX     |
   // *----------+
 
-  tet_infoline("Test that the image has been scaled to match the alpha mask" );
-  DALI_TEST_EQUALS( imageData.GetWidth(), 20, TEST_LOCATION );
-  DALI_TEST_EQUALS( imageData.GetHeight(), 20, TEST_LOCATION );
+  tet_infoline("Test that the image has been scaled to match the alpha mask");
+  DALI_TEST_EQUALS(imageData.GetWidth(), 20, TEST_LOCATION);
+  DALI_TEST_EQUALS(imageData.GetHeight(), 20, TEST_LOCATION);
 
-  tet_infoline( "Test that pixels in the outer eighths have no alpha\n" );
+  tet_infoline("Test that pixels in the outer eighths have no alpha\n");
 
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 0, 0), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 9, 4), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 15, 4), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 19, 4), 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 0, 0), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 9, 4), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 15, 4), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 19, 4), 0x00u, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 0, 19), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 8, 18), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 15,17), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 19,16), 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 0, 19), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 8, 18), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 15, 17), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 19, 16), 0x00u, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 0, 1), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 1, 7), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 2, 10), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 3, 19), 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 0, 1), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 1, 7), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 2, 10), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 3, 19), 0x00u, TEST_LOCATION);
 
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 19, 1), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 7), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 17, 10), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 16, 19), 0x00u, TEST_LOCATION );
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 19, 1), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 7), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 17, 10), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 16, 19), 0x00u, TEST_LOCATION);
 
-  tet_infoline( "Test that pixels in the center have full alpha\n" );
+  tet_infoline("Test that pixels in the center have full alpha\n");
 
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 12, 8), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData,  8, 12), 0xffu, TEST_LOCATION );
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 12, 8), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 8, 12), 0xffu, TEST_LOCATION);
 
   END_TEST;
 }
@@ -580,12 +573,12 @@ int UtcDaliPixelBufferMask07(void)
 int UtcDaliPixelBufferMask08(void)
 {
   TestApplication application;
-  tet_infoline("Test scaling of source image to larger than the alpha mask" );
+  tet_infoline("Test scaling of source image to larger than the alpha mask");
 
-  unsigned int width = 32u;
-  unsigned int height = 20u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
-  AlternateQuadrants( maskData );
+  unsigned int       width    = 32u;
+  unsigned int       height   = 20u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
+  AlternateQuadrants(maskData);
 
   // +-----XXXXX+
   // |     XXXXX|
@@ -594,9 +587,9 @@ int UtcDaliPixelBufferMask08(void)
   // |XXXXX     |
   // *XXXXX-----+
 
-  width = 20u;
-  height = 16u;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  width                        = 20u;
+  height                       = 16u;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   MaskCenterSquare(imageData);
 
   // +----------+
@@ -606,7 +599,7 @@ int UtcDaliPixelBufferMask08(void)
   // |  XXXXXX  |
   // *----------+
 
-  imageData.ApplyMask( maskData, 4.0f, true );
+  imageData.ApplyMask(maskData, 4.0f, true);
 
   // +-----XXXXX+   quadrant
   // |     XXXXX|    1    2
@@ -615,48 +608,47 @@ int UtcDaliPixelBufferMask08(void)
   // |XXXXX     |
   // *XXXXX-----+
 
-  tet_infoline("Test that the image has been scaled and cropped to match the alpha mask" );
-  DALI_TEST_EQUALS( imageData.GetWidth(), 32, TEST_LOCATION );
-  DALI_TEST_EQUALS( imageData.GetHeight(), 20, TEST_LOCATION );
-
-  tet_infoline( "Test that the image has been resized (the center square should now fill the image)\n");
-  tet_infoline( "Test that the first quadrant has no alpha");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 0, 0), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 5, 4), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 5, 8), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 14, 8), 0x00u, TEST_LOCATION );
-
-  tet_infoline( "Test that the second quadrant has alpha and data");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 0), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 30, 1), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 30, 8), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 19, 8), 0xffu, TEST_LOCATION );
-
-  tet_infoline( "Test that the third quadrant has no alpha");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 12), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 31, 12), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 31, 19), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 19), 0x00u, TEST_LOCATION );
-
-  tet_infoline( "Test that the fourth quadrant has alpha and data");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 1, 12), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 7, 12), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 7, 19), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 1, 19), 0xffu, TEST_LOCATION );
+  tet_infoline("Test that the image has been scaled and cropped to match the alpha mask");
+  DALI_TEST_EQUALS(imageData.GetWidth(), 32, TEST_LOCATION);
+  DALI_TEST_EQUALS(imageData.GetHeight(), 20, TEST_LOCATION);
+
+  tet_infoline("Test that the image has been resized (the center square should now fill the image)\n");
+  tet_infoline("Test that the first quadrant has no alpha");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 0, 0), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 5, 4), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 5, 8), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 14, 8), 0x00u, TEST_LOCATION);
+
+  tet_infoline("Test that the second quadrant has alpha and data");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 0), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 30, 1), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 30, 8), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 19, 8), 0xffu, TEST_LOCATION);
+
+  tet_infoline("Test that the third quadrant has no alpha");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 12), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 31, 12), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 31, 19), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 19), 0x00u, TEST_LOCATION);
+
+  tet_infoline("Test that the fourth quadrant has alpha and data");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 1, 12), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 7, 12), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 7, 19), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 1, 19), 0xffu, TEST_LOCATION);
 
   END_TEST;
 }
 
-
 int UtcDaliPixelBufferMask09(void)
 {
   TestApplication application;
-  tet_infoline("Test scaling of large source image to larger than the alpha mask" );
+  tet_infoline("Test scaling of large source image to larger than the alpha mask");
 
-  unsigned int width = 32u;
-  unsigned int height = 20u;
-  Devel::PixelBuffer maskData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
-  AlternateQuadrants( maskData );
+  unsigned int       width    = 32u;
+  unsigned int       height   = 20u;
+  Devel::PixelBuffer maskData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
+  AlternateQuadrants(maskData);
 
   // +-----XXXXX+
   // |     XXXXX|
@@ -665,9 +657,9 @@ int UtcDaliPixelBufferMask09(void)
   // |XXXXX     |
   // *XXXXX-----+
 
-  width = 40u;
-  height = 50u;
-  Devel::PixelBuffer imageData = Devel::PixelBuffer::New( width, height, Pixel::RGBA8888 );
+  width                        = 40u;
+  height                       = 50u;
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(width, height, Pixel::RGBA8888);
   MaskCenterSquare(imageData);
 
   // +----------+
@@ -677,7 +669,7 @@ int UtcDaliPixelBufferMask09(void)
   // |  XXXXXX  |
   // *----------+
 
-  imageData.ApplyMask( maskData, 1.6f, true );
+  imageData.ApplyMask(maskData, 1.6f, true);
 
   // +-----XXXXX+   quadrant
   // |     XXXXX|    1    2
@@ -686,34 +678,67 @@ int UtcDaliPixelBufferMask09(void)
   // |XXXXX     |
   // *XXXXX-----+
 
-  tet_infoline("Test that the image has been scaled and cropped to match the alpha mask" );
-  DALI_TEST_EQUALS( imageData.GetWidth(), 32, TEST_LOCATION );
-  DALI_TEST_EQUALS( imageData.GetHeight(), 20, TEST_LOCATION );
-
-  tet_infoline( "Test that the image has been resized (the center square should now fill the image)\n");
-  tet_infoline( "Test that the first quadrant has no alpha");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 0, 0), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 5, 4), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 5, 8), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 14, 8), 0x00u, TEST_LOCATION );
-
-  tet_infoline( "Test that the second quadrant has alpha and data");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 0), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 30, 1), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 30, 8), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 19, 8), 0xffu, TEST_LOCATION );
-
-  tet_infoline( "Test that the third quadrant has no alpha");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 12), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 31, 12), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 31, 19), 0x00u, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 18, 19), 0x00u, TEST_LOCATION );
-
-  tet_infoline( "Test that the fourth quadrant has alpha and data");
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 1, 12), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 7, 12), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 7, 19), 0xffu, TEST_LOCATION );
-  DALI_TEST_EQUALS( GetAlphaAt(imageData, 1, 19), 0xffu, TEST_LOCATION );
+  tet_infoline("Test that the image has been scaled and cropped to match the alpha mask");
+  DALI_TEST_EQUALS(imageData.GetWidth(), 32, TEST_LOCATION);
+  DALI_TEST_EQUALS(imageData.GetHeight(), 20, TEST_LOCATION);
+
+  tet_infoline("Test that the image has been resized (the center square should now fill the image)\n");
+  tet_infoline("Test that the first quadrant has no alpha");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 0, 0), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 5, 4), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 5, 8), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 14, 8), 0x00u, TEST_LOCATION);
+
+  tet_infoline("Test that the second quadrant has alpha and data");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 0), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 30, 1), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 30, 8), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 19, 8), 0xffu, TEST_LOCATION);
+
+  tet_infoline("Test that the third quadrant has no alpha");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 12), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 31, 12), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 31, 19), 0x00u, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 18, 19), 0x00u, TEST_LOCATION);
+
+  tet_infoline("Test that the fourth quadrant has alpha and data");
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 1, 12), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 7, 12), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 7, 19), 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(GetAlphaAt(imageData, 1, 19), 0xffu, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int UtcDaliPixelBufferGaussianBlur(void)
+{
+  TestApplication application;
+
+  Devel::PixelBuffer imageData = Devel::PixelBuffer::New(10, 10, Pixel::RGBA8888);
+  FillCheckerboard(imageData);
+
+  DALI_TEST_EQUALS(imageData.GetWidth(), 10, TEST_LOCATION);
+  DALI_TEST_EQUALS(imageData.GetHeight(), 10, TEST_LOCATION);
+
+  unsigned char* buffer = imageData.GetBuffer();
+
+  // Test that an even pixel in the odd row has full alpha value
+  DALI_TEST_EQUALS(buffer[43], 0xffu, TEST_LOCATION);
+
+  // Test that an even pixel in the even row has no alpha value
+  DALI_TEST_EQUALS(buffer[55], 0x00u, TEST_LOCATION);
+
+  imageData.ApplyGaussianBlur(0.0f);
+
+  // Test that the pixels' alpha values are not changed because there is no blur
+  DALI_TEST_EQUALS(buffer[43], 0xffu, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[55], 0x00u, TEST_LOCATION);
+
+  imageData.ApplyGaussianBlur(1.0f);
+
+  // Test that the pixels' alpha values are changed after applying gaussian blur
+  DALI_TEST_EQUALS(buffer[43], 0x7Au, TEST_LOCATION);
+  DALI_TEST_EQUALS(buffer[55], 0x7Eu, TEST_LOCATION);
 
   END_TEST;
 }