Renaming PropertyBuffer to VertexBuffer
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Renderer.cpp
index 0dcdfa8..7b700ce 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.
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/actors/actor-devel.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
+#include <dali/devel-api/common/stage.h>
 
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/images/texture-set-image.h>
+#include <dali/integration-api/render-task-list-integ.h>
 #include <cstdio>
 #include <string>
 
@@ -88,7 +90,6 @@ void renderer_test_cleanup(void)
   test_return_value = TET_PASS;
 }
 
-
 int UtcDaliRendererNew01(void)
 {
   TestApplication application;
@@ -139,6 +140,57 @@ int UtcDaliRendererAssignmentOperator(void)
   END_TEST;
 }
 
+int UtcDaliRendererMoveConstructor(void)
+{
+  TestApplication application;
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+  DALI_TEST_CHECK( renderer );
+  DALI_TEST_EQUALS( 1, renderer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::TRANSPARENT, TEST_LOCATION );
+
+  renderer.SetProperty( Renderer::Property::BLEND_COLOR, Color::MAGENTA );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+
+  Renderer move = std::move( renderer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+  DALI_TEST_CHECK( !renderer );
+
+  END_TEST;
+}
+
+int UtcDaliRendererMoveAssignment(void)
+{
+  TestApplication application;
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+  DALI_TEST_CHECK( renderer );
+  DALI_TEST_EQUALS( 1, renderer.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::TRANSPARENT, TEST_LOCATION );
+
+  renderer.SetProperty( Renderer::Property::BLEND_COLOR, Color::MAGENTA );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+
+  Renderer move;
+  move = std::move( renderer );
+  DALI_TEST_CHECK( move );
+  DALI_TEST_EQUALS( 1, move.GetBaseObject().ReferenceCount(), TEST_LOCATION );
+  DALI_TEST_EQUALS( move.GetProperty<Vector4>( Renderer::Property::BLEND_COLOR ), Color::MAGENTA, TEST_LOCATION );
+  DALI_TEST_CHECK( !renderer );
+
+  END_TEST;
+}
+
 int UtcDaliRendererDownCast01(void)
 {
   TestApplication application;
@@ -163,6 +215,85 @@ int UtcDaliRendererDownCast02(void)
   END_TEST;
 }
 
+// using a template to auto deduce the parameter types
+template< typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7, typename P8>
+void TEST_RENDERER_PROPERTY( P1 renderer, P2 stringName, P3 type, P4 isWriteable, P5 isAnimateable, P6 isConstraintInput, P7 enumName, P8 LOCATION )
+{
+  DALI_TEST_EQUALS( renderer.GetPropertyName( enumName ), stringName, LOCATION );
+  DALI_TEST_EQUALS( renderer.GetPropertyIndex( stringName ), static_cast<Property::Index>(enumName), LOCATION );
+  DALI_TEST_EQUALS( renderer.GetPropertyType( enumName ), type, LOCATION );
+  DALI_TEST_EQUALS( renderer.IsPropertyWritable( enumName ), isWriteable, LOCATION );
+  DALI_TEST_EQUALS( renderer.IsPropertyAnimatable( enumName ), isAnimateable, LOCATION );
+  DALI_TEST_EQUALS( renderer.IsPropertyAConstraintInput( enumName ), isConstraintInput, LOCATION );
+}
+
+int UtcDaliRendererDefaultProperties(void)
+{
+  TestApplication application;
+/* from renderer-impl.cpp
+  DALI_PROPERTY( "depthIndex",                      INTEGER,   true, false,  false, Dali::Renderer::Property::DEPTH_INDEX )
+  DALI_PROPERTY( "faceCullingMode",                 INTEGER,   true, false,  false, Dali::Renderer::Property::FACE_CULLING_MODE )
+  DALI_PROPERTY( "blendMode",                       INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_MODE )
+  DALI_PROPERTY( "blendEquationRgb",                INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_EQUATION_RGB )
+  DALI_PROPERTY( "blendEquationAlpha",              INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_EQUATION_ALPHA )
+  DALI_PROPERTY( "blendFactorSrcRgb",               INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_FACTOR_SRC_RGB )
+  DALI_PROPERTY( "blendFactorDestRgb",              INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_FACTOR_DEST_RGB )
+  DALI_PROPERTY( "blendFactorSrcAlpha",             INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_FACTOR_SRC_ALPHA )
+  DALI_PROPERTY( "blendFactorDestAlpha",            INTEGER,   true, false,  false, Dali::Renderer::Property::BLEND_FACTOR_DEST_ALPHA )
+  DALI_PROPERTY( "blendColor",                      VECTOR4,   true, false,  false, Dali::Renderer::Property::BLEND_COLOR )
+  DALI_PROPERTY( "blendPreMultipliedAlpha",         BOOLEAN,   true, false,  false, Dali::Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA )
+  DALI_PROPERTY( "indexRangeFirst",                 INTEGER,   true, false,  false, Dali::Renderer::Property::INDEX_RANGE_FIRST )
+  DALI_PROPERTY( "indexRangeCount",                 INTEGER,   true, false,  false, Dali::Renderer::Property::INDEX_RANGE_COUNT )
+  DALI_PROPERTY( "depthWriteMode",                  INTEGER,   true, false,  false, Dali::Renderer::Property::DEPTH_WRITE_MODE )
+  DALI_PROPERTY( "depthFunction",                   INTEGER,   true, false,  false, Dali::Renderer::Property::DEPTH_FUNCTION )
+  DALI_PROPERTY( "depthTestMode",                   INTEGER,   true, false,  false, Dali::Renderer::Property::DEPTH_TEST_MODE )
+  DALI_PROPERTY( "renderMode",                      INTEGER,   true, false,  false, Dali::Renderer::Property::RENDER_MODE )
+  DALI_PROPERTY( "stencilFunction",                 INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_FUNCTION )
+  DALI_PROPERTY( "stencilFunctionMask",             INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_FUNCTION_MASK )
+  DALI_PROPERTY( "stencilFunctionReference",        INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_FUNCTION_REFERENCE )
+  DALI_PROPERTY( "stencilMask",                     INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_MASK )
+  DALI_PROPERTY( "stencilOperationOnFail",          INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_OPERATION_ON_FAIL )
+  DALI_PROPERTY( "stencilOperationOnZFail",         INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL )
+  DALI_PROPERTY( "stencilOperationOnZPass",         INTEGER,   true, false,  false, Dali::Renderer::Property::STENCIL_OPERATION_ON_Z_PASS )
+  DALI_PROPERTY( "opacity",                         FLOAT,     true, true,   true,  Dali::DevelRenderer::Property::OPACITY )
+  DALI_PROPERTY( "renderingBehavior",               INTEGER,   true, false,  false, Dali::DevelRenderer::Property::RENDERING_BEHAVIOR )
+*/
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = CreateShader();
+  Renderer renderer = Renderer::New(geometry, shader);
+  DALI_TEST_EQUALS( renderer.GetPropertyCount(), 26, TEST_LOCATION );
+
+  TEST_RENDERER_PROPERTY( renderer, "depthIndex",              Property::INTEGER, true, false, false, Renderer::Property::DEPTH_INDEX, TEST_LOCATION );
+  TEST_RENDERER_PROPERTY( renderer, "faceCullingMode",         Property::INTEGER, true, false, false, Renderer::Property::FACE_CULLING_MODE, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendMode",               Property::INTEGER, true, false, false, Renderer::Property::BLEND_MODE, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendEquationRgb",        Property::INTEGER, true, false, false, Renderer::Property::BLEND_EQUATION_RGB, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendEquationAlpha",      Property::INTEGER, true, false, false, Renderer::Property::BLEND_EQUATION_ALPHA, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendFactorSrcRgb",       Property::INTEGER, true, false, false, Renderer::Property::BLEND_FACTOR_SRC_RGB, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendFactorDestRgb",      Property::INTEGER, true, false, false, Renderer::Property::BLEND_FACTOR_DEST_RGB, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendFactorSrcAlpha",     Property::INTEGER, true, false, false, Renderer::Property::BLEND_FACTOR_SRC_ALPHA, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendFactorDestAlpha",    Property::INTEGER, true, false, false, Renderer::Property::BLEND_FACTOR_DEST_ALPHA, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendColor",              Property::VECTOR4, true, false, false, Renderer::Property::BLEND_COLOR, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "blendPreMultipliedAlpha", Property::BOOLEAN, true, false, false, Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "indexRangeFirst",         Property::INTEGER, true, false, false, Renderer::Property::INDEX_RANGE_FIRST, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "indexRangeCount",         Property::INTEGER, true, false, false, Renderer::Property::INDEX_RANGE_COUNT, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "depthWriteMode",          Property::INTEGER, true, false, false, Renderer::Property::DEPTH_WRITE_MODE, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "depthFunction",           Property::INTEGER, true, false, false, Renderer::Property::DEPTH_FUNCTION, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "depthTestMode",           Property::INTEGER, true, false, false, Renderer::Property::DEPTH_TEST_MODE, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "renderMode",              Property::INTEGER, true, false, false, Renderer::Property::RENDER_MODE, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilFunction",         Property::INTEGER, true, false, false, Renderer::Property::STENCIL_FUNCTION, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilFunctionMask",     Property::INTEGER, true, false, false, Renderer::Property::STENCIL_FUNCTION_MASK, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilFunctionReference",Property::INTEGER, true, false, false, Renderer::Property::STENCIL_FUNCTION_REFERENCE, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilMask",             Property::INTEGER, true, false, false, Renderer::Property::STENCIL_MASK, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilOperationOnFail",  Property::INTEGER, true, false, false, Renderer::Property::STENCIL_OPERATION_ON_FAIL, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilOperationOnZFail", Property::INTEGER, true, false, false, Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "stencilOperationOnZPass", Property::INTEGER, true, false, false, Renderer::Property::STENCIL_OPERATION_ON_Z_PASS, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "opacity",                 Property::FLOAT,   true, true,  true,  DevelRenderer::Property::OPACITY, TEST_LOCATION  );
+  TEST_RENDERER_PROPERTY( renderer, "renderingBehavior",       Property::INTEGER, true, false, false, DevelRenderer::Property::RENDERING_BEHAVIOR, TEST_LOCATION );
+
+  END_TEST;
+}
+
 int UtcDaliRendererSetGetGeometry(void)
 {
   TestApplication application;
@@ -175,8 +306,8 @@ int UtcDaliRendererSetGetGeometry(void)
   Renderer renderer = Renderer::New(geometry1, shader);
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -210,8 +341,8 @@ int UtcDaliRendererSetGetShader(void)
   Renderer renderer = Renderer::New(geometry, shader1);
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
   application.SendNotification();
@@ -250,8 +381,8 @@ int UtcDaliRendererSetGetDepthIndex(void)
   Renderer renderer = Renderer::New(geometry, shader);
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   application.SendNotification();
   application.Render(0);
@@ -259,15 +390,21 @@ int UtcDaliRendererSetGetDepthIndex(void)
 
   renderer.SetProperty( Renderer::Property::DEPTH_INDEX, 1 );
 
+  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty<int>(Renderer::Property::DEPTH_INDEX), 0, TEST_LOCATION );
+
   application.SendNotification();
   application.Render(0);
-  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 1, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty<int>(Renderer::Property::DEPTH_INDEX), 1, TEST_LOCATION );
 
   renderer.SetProperty( Renderer::Property::DEPTH_INDEX, 10 );
 
+  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 10, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty<int>(Renderer::Property::DEPTH_INDEX), 1, TEST_LOCATION );
+
   application.SendNotification();
   application.Render(0);
-  DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 10, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty<int>(Renderer::Property::DEPTH_INDEX), 10, TEST_LOCATION );
 
   END_TEST;
 }
@@ -283,8 +420,8 @@ int UtcDaliRendererSetGetFaceCullingMode(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   // By default, none of the faces should be culled
   unsigned int cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
@@ -368,10 +505,10 @@ int UtcDaliRendererBlendOptions01(void)
 
   Actor actor = Actor::New();
   // set a transparent actor color so that blending is enabled
-  actor.SetOpacity( 0.5f );
+  actor.SetProperty( Actor::Property::OPACITY, 0.5f );
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB,    BlendFactor::ONE_MINUS_SRC_COLOR );
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB,   BlendFactor::SRC_ALPHA_SATURATE  );
@@ -413,10 +550,10 @@ int UtcDaliRendererBlendOptions02(void)
   Renderer renderer = Renderer::New( geometry, shader );
 
   Actor actor = Actor::New();
-  actor.SetOpacity( 0.5f ); // enable blending
+  actor.SetProperty( Actor::Property::OPACITY, 0.5f ); // enable blending
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB,    BlendFactor::CONSTANT_COLOR );
   renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB,   BlendFactor::ONE_MINUS_CONSTANT_COLOR );
@@ -460,8 +597,8 @@ int UtcDaliRendererBlendOptions03(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   // Test the defaults as documented in blending.h
   int equationRgb   = renderer.GetProperty<int>( Renderer::Property::BLEND_EQUATION_RGB );
@@ -484,10 +621,10 @@ int UtcDaliRendererBlendOptions04(void)
   Renderer renderer = Renderer::New( geometry, shader );
 
   Actor actor = Actor::New();
-  actor.SetOpacity( 0.1f );
+  actor.SetProperty( Actor::Property::OPACITY, 0.1f );
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   // Test the single blending equation setting
   {
@@ -529,10 +666,10 @@ int UtcDaliRendererSetBlendMode01(void)
   Renderer renderer = Renderer::New( geometry, shader );
 
   Actor actor = Actor::New();
-  actor.SetOpacity( 0.98f );
+  actor.SetProperty( Actor::Property::OPACITY, 0.98f );
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
 
@@ -550,6 +687,41 @@ int UtcDaliRendererSetBlendMode01(void)
   END_TEST;
 }
 
+int UtcDaliRendererSetBlendMode01b(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to on with an transparent color renders with blending enabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = CreateShader();
+  Renderer renderer = Renderer::New( geometry, shader );
+
+  Actor actor = Actor::New();
+  actor.SetProperty( Actor::Property::OPACITY, 0.0f );
+  actor.AddRenderer(renderer);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+  glAbstraction.EnableDrawCallTrace( true );
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( !glEnableStack.FindMethod( "Enable" ) );
+
+  DALI_TEST_CHECK( !glAbstraction.GetDrawTrace().FindMethod( "DrawElements" ) );
+
+  END_TEST;
+}
+
 int UtcDaliRendererSetBlendMode02(void)
 {
   TestApplication application;
@@ -561,10 +733,10 @@ int UtcDaliRendererSetBlendMode02(void)
   Renderer renderer = Renderer::New( geometry, shader );
 
   Actor actor = Actor::New();
-  actor.SetOpacity( 0.15f );
+  actor.SetProperty( Actor::Property::OPACITY, 0.15f );
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::OFF);
 
@@ -593,10 +765,10 @@ int UtcDaliRendererSetBlendMode03(void)
   Renderer renderer = Renderer::New( geometry, shader );
 
   Actor actor = Actor::New();
-  actor.SetOpacity( 0.75f );
+  actor.SetProperty( Actor::Property::OPACITY, 0.75f );
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -626,8 +798,8 @@ int UtcDaliRendererSetBlendMode04(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -657,9 +829,9 @@ int UtcDaliRendererSetBlendMode04b(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -689,9 +861,9 @@ int UtcDaliRendererSetBlendMode04c(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  actor.SetColor( Color::MAGENTA );
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -716,7 +888,7 @@ int UtcDaliRendererSetBlendMode05(void)
   tet_infoline("Test setting the blend mode to auto with an opaque color and an image with an alpha channel renders with blending enabled");
 
   Geometry geometry = CreateQuadGeometry();
-  BufferImage image = BufferImage::New( 40, 40, Pixel::RGBA8888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 40, 40);
 
   Shader shader = CreateShader();
   TextureSet textureSet = CreateTextureSet( image );
@@ -725,8 +897,8 @@ int UtcDaliRendererSetBlendMode05(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -756,8 +928,8 @@ int UtcDaliRendererSetBlendMode06(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -783,15 +955,15 @@ int UtcDaliRendererSetBlendMode07(void)
   Geometry geometry = CreateQuadGeometry();
   Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
 
-  BufferImage image = BufferImage::New( 50, 50, Pixel::RGB888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGB888, 50, 50);
   TextureSet textureSet = CreateTextureSet( image );
   Renderer renderer = Renderer::New( geometry, shader );
   renderer.SetTextures( textureSet );
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
 
@@ -843,26 +1015,36 @@ int UtcDaliRendererSetBlendColor(void)
   Geometry geometry = CreateQuadGeometry();
   Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
   TextureSet textureSet = TextureSet::New();
-  BufferImage image = BufferImage::New( 50, 50, Pixel::RGBA8888 );
-  TextureSetImage( textureSet, 0u, image );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 50, 50);
+  textureSet.SetTexture(0u, image);
   Renderer renderer = Renderer::New( geometry, shader );
   renderer.SetTextures( textureSet );
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
 
   renderer.SetProperty( Renderer::Property::BLEND_COLOR, Color::TRANSPARENT );
+
   application.SendNotification();
   application.Render();
+
+  DALI_TEST_EQUALS( renderer.GetProperty< Vector4 >(Renderer::Property::BLEND_COLOR), Color::TRANSPARENT, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector4 >(Renderer::Property::BLEND_COLOR), Color::TRANSPARENT, TEST_LOCATION );
   DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), Color::TRANSPARENT, TEST_LOCATION );
 
   renderer.SetProperty( Renderer::Property::BLEND_COLOR, Color::MAGENTA );
+
+  DALI_TEST_EQUALS( renderer.GetProperty< Vector4 >(Renderer::Property::BLEND_COLOR), Color::MAGENTA, TEST_LOCATION );
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector4 >(Renderer::Property::BLEND_COLOR), Color::TRANSPARENT, TEST_LOCATION );
+
   application.SendNotification();
   application.Render();
+
+  DALI_TEST_EQUALS( renderer.GetCurrentProperty< Vector4 >(Renderer::Property::BLEND_COLOR), Color::MAGENTA, TEST_LOCATION );
   DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), Color::MAGENTA, TEST_LOCATION );
 
   Vector4 color( 0.1f, 0.2f, 0.3f, 0.4f );
@@ -912,9 +1094,9 @@ int UtcDaliRendererPreMultipledAlpha(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
+  application.GetScene().Add(actor);
 
   Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
   bool preMultipliedAlpha;
@@ -939,7 +1121,8 @@ int UtcDaliRendererPreMultipledAlpha(void)
   DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uColor", actualValue ) );
   DALI_TEST_EQUALS( actualValue, Vector4(1.0f, 0.0f, 1.0f, 0.5f), TEST_LOCATION );
 
-  renderer.SetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, true);
+  // Enable pre-multiplied alpha
+  renderer.SetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, true );
 
   application.SendNotification();
   application.Render();
@@ -948,6 +1131,10 @@ int UtcDaliRendererPreMultipledAlpha(void)
   DALI_TEST_CHECK( value.Get( preMultipliedAlpha ) );
   DALI_TEST_CHECK( preMultipliedAlpha );
 
+  value = renderer.GetCurrentProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
+  DALI_TEST_CHECK( value.Get( preMultipliedAlpha ) );
+  DALI_TEST_CHECK( preMultipliedAlpha );
+
   srcFactorRgb    = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_RGB );
   destFactorRgb   = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_RGB );
   srcFactorAlpha  = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_ALPHA );
@@ -956,11 +1143,38 @@ int UtcDaliRendererPreMultipledAlpha(void)
   DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 srcFactorRgb,    TEST_LOCATION );
   DALI_TEST_EQUALS( (int)BlendFactor::ONE_MINUS_SRC_ALPHA, destFactorRgb,   TEST_LOCATION );
   DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 srcFactorAlpha,  TEST_LOCATION );
-  DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 destFactorAlpha, TEST_LOCATION );
+  DALI_TEST_EQUALS( (int)BlendFactor::ONE_MINUS_SRC_ALPHA, destFactorAlpha, TEST_LOCATION );
 
   DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uColor", actualValue ) );
   DALI_TEST_EQUALS( actualValue, Vector4(0.5f, 0.0f, 0.5f, 0.5f), TEST_LOCATION );
 
+  // Disable pre-multiplied alpha again
+  renderer.SetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, false );
+
+  application.SendNotification();
+  application.Render();
+
+  value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
+  DALI_TEST_CHECK( value.Get( preMultipliedAlpha ) );
+  DALI_TEST_CHECK( !preMultipliedAlpha );
+
+  value = renderer.GetCurrentProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
+  DALI_TEST_CHECK( value.Get( preMultipliedAlpha ) );
+  DALI_TEST_CHECK( !preMultipliedAlpha );
+
+  srcFactorRgb    = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_RGB );
+  destFactorRgb   = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_RGB );
+  srcFactorAlpha  = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_SRC_ALPHA );
+  destFactorAlpha = renderer.GetProperty<int>( Renderer::Property::BLEND_FACTOR_DEST_ALPHA );
+
+  DALI_TEST_EQUALS( (int)BlendFactor::SRC_ALPHA,           srcFactorRgb,    TEST_LOCATION );
+  DALI_TEST_EQUALS( (int)BlendFactor::ONE_MINUS_SRC_ALPHA, destFactorRgb,   TEST_LOCATION );
+  DALI_TEST_EQUALS( (int)BlendFactor::ONE,                 srcFactorAlpha,  TEST_LOCATION );
+  DALI_TEST_EQUALS( (int)BlendFactor::ONE_MINUS_SRC_ALPHA, destFactorAlpha, TEST_LOCATION );
+
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "uColor", actualValue ) );
+  DALI_TEST_EQUALS( actualValue, Vector4( 1.0f, 0.0f, 1.0f, 0.5f ), TEST_LOCATION );
+
   END_TEST;
 }
 
@@ -976,8 +1190,8 @@ int UtcDaliRendererConstraint01(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   Vector4 initialColor = Color::WHITE;
   Property::Index colorIndex = renderer.RegisterProperty( "uFadeColor", initialColor );
@@ -1018,8 +1232,8 @@ int UtcDaliRendererConstraint02(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1072,8 +1286,8 @@ int UtcDaliRendererAnimatedProperty01(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
 
   Vector4 initialColor = Color::WHITE;
   Property::Index colorIndex = renderer.RegisterProperty( "uFadeColor", initialColor );
@@ -1113,8 +1327,8 @@ int UtcDaliRendererAnimatedProperty02(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1156,7 +1370,7 @@ int UtcDaliRendererUniformMapPrecendence01(void)
 
   tet_infoline("Test the uniform map precedence is applied properly");
 
-  Image image = BufferImage::New( 64, 64, Pixel::RGBA8888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 64, 64);
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   TextureSet textureSet = CreateTextureSet( image );
@@ -1167,8 +1381,8 @@ int UtcDaliRendererUniformMapPrecendence01(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1213,7 +1427,7 @@ int UtcDaliRendererUniformMapPrecendence02(void)
 
   tet_infoline("Test the uniform map precedence is applied properly");
 
-  Image image = BufferImage::New( 64, 64, Pixel::RGBA8888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 64, 64);
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   TextureSet textureSet = CreateTextureSet( image );
@@ -1224,8 +1438,8 @@ int UtcDaliRendererUniformMapPrecendence02(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1271,7 +1485,7 @@ int UtcDaliRendererUniformMapPrecendence03(void)
 
   tet_infoline("Test the uniform map precedence is applied properly");
 
-  Image image = BufferImage::New( 64, 64, Pixel::RGBA8888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 64, 64);
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   TextureSet textureSet = CreateTextureSet( image );
@@ -1282,8 +1496,8 @@ int UtcDaliRendererUniformMapPrecendence03(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1309,7 +1523,7 @@ int UtcDaliRendererUniformMapMultipleUniforms01(void)
 
   tet_infoline("Test the uniform maps are collected from all objects (same type)");
 
-  Image image = BufferImage::New( 64, 64, Pixel::RGBA8888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 64, 64);
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   TextureSet textureSet = CreateTextureSet( image );
@@ -1320,8 +1534,8 @@ int UtcDaliRendererUniformMapMultipleUniforms01(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1356,7 +1570,7 @@ int UtcDaliRendererUniformMapMultipleUniforms02(void)
 
   tet_infoline("Test the uniform maps are collected from all objects (different types)");
 
-  Image image = BufferImage::New( 64, 64, Pixel::RGBA8888 );
+  Texture image = Texture::New(TextureType::TEXTURE_2D, Pixel::RGBA8888, 64, 64);
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   TextureSet textureSet = CreateTextureSet( image );
@@ -1367,8 +1581,8 @@ int UtcDaliRendererUniformMapMultipleUniforms02(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
   application.SendNotification();
   application.Render(0);
 
@@ -1405,7 +1619,7 @@ int UtcDaliRendererUniformMapMultipleUniforms02(void)
 
 Renderer CreateRenderer( Actor actor, Geometry geometry, Shader shader, int depthIndex )
 {
-  Image image0 = BufferImage::New( 64, 64, Pixel::RGB888 );
+  Texture image0 = Texture::New(TextureType::TEXTURE_2D, Pixel::RGB888, 64, 64);
   TextureSet textureSet0 = CreateTextureSet( image0 );
   Renderer renderer0 = Renderer::New( geometry, shader );
   renderer0.SetTextures( textureSet0 );
@@ -1417,16 +1631,16 @@ Renderer CreateRenderer( Actor actor, Geometry geometry, Shader shader, int dept
 
 Actor CreateActor( Actor parent, int siblingOrder, const char* location )
 {
-  Actor actor0 = Actor::New();
-  actor0.SetAnchorPoint(AnchorPoint::CENTER);
-  actor0.SetParentOrigin(AnchorPoint::CENTER);
-  actor0.SetPosition(0.0f,0.0f);
-  actor0.SetSize(100, 100);
-  actor0.SetProperty( Dali::DevelActor::Property::SIBLING_ORDER, siblingOrder );
-  DALI_TEST_EQUALS( actor0.GetProperty<int>( Dali::DevelActor::Property::SIBLING_ORDER), siblingOrder, TEST_INNER_LOCATION(location) );
-  parent.Add(actor0);
-
-  return actor0;
+  Actor actor = Actor::New();
+  actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+  actor.SetProperty( Actor::Property::PARENT_ORIGIN,AnchorPoint::CENTER);
+  actor.SetProperty( Actor::Property::POSITION, Vector2(0.0f,0.0f));
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  parent.Add(actor);
+  actor.SetProperty( Dali::DevelActor::Property::SIBLING_ORDER, siblingOrder );
+  DALI_TEST_EQUALS( actor.GetProperty<int>( Dali::DevelActor::Property::SIBLING_ORDER), siblingOrder, TEST_INNER_LOCATION(location) );
+
+  return actor;
 }
 
 int UtcDaliRendererRenderOrder2DLayer(void)
@@ -1437,7 +1651,7 @@ int UtcDaliRendererRenderOrder2DLayer(void)
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
 
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
 
   Actor actor0 = CreateActor( root, 0, TEST_LOCATION );
   Renderer renderer0 = CreateRenderer( actor0, geometry, shader, 0 );
@@ -1529,7 +1743,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
 
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
 
   Actor actor0 = CreateActor( root, 0, TEST_LOCATION );
   Actor actor1 = CreateActor( actor0, 0, TEST_LOCATION );
@@ -1562,7 +1776,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   //Check that renderer0 has been rendered after renderer2
   DALI_TEST_GREATER( textureBindIndex[4], textureBindIndex[5], TEST_LOCATION );
 
-  //Check that renderer0 has been rendered after renderer2
+  //Check that renderer5 has been rendered after renderer2
   DALI_TEST_GREATER( textureBindIndex[5], textureBindIndex[0], TEST_LOCATION );
 
   //Check that renderer0 has been rendered after renderer2
@@ -1617,7 +1831,7 @@ int UtcDaliRendererRenderOrder2DLayerSiblingOrder(void)
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
   Actor actor0 = CreateActor( root,   1, TEST_LOCATION );
   Actor actor1 = CreateActor( root,   0, TEST_LOCATION );
   Actor actor2 = CreateActor( actor0, 0, TEST_LOCATION );
@@ -1684,7 +1898,7 @@ int UtcDaliRendererRenderOrder2DLayerOverlay(void)
 
   Shader shader = Shader::New("VertexSource", "FragmentSource");
   Geometry geometry = CreateQuadGeometry();
-  Actor root = Stage::GetCurrent().GetRootLayer();
+  Actor root = application.GetScene().GetRootLayer();
 
   /*
    * Create the following hierarchy:
@@ -1708,18 +1922,18 @@ int UtcDaliRendererRenderOrder2DLayerOverlay(void)
    */
 
   Actor actor0 = CreateActor( root, 0, TEST_LOCATION );
-  actor0.SetDrawMode( DrawMode::OVERLAY_2D );
+  actor0.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
   Renderer renderer0 = CreateRenderer( actor0, geometry, shader, 0 );
 
   Actor actor1 = CreateActor( root, 0, TEST_LOCATION );
-  actor1.SetDrawMode( DrawMode::OVERLAY_2D );
+  actor1.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
   Renderer renderer1 = CreateRenderer( actor1, geometry, shader, 0 );
 
   Actor actor2 = CreateActor( root, 0, TEST_LOCATION );
   Renderer renderer2 = CreateRenderer( actor2, geometry, shader, 0 );
 
   Actor actor3 = CreateActor( root, 0, TEST_LOCATION );
-  actor3.SetDrawMode( DrawMode::OVERLAY_2D );
+  actor3.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
   Renderer renderer3 = CreateRenderer( actor3, geometry, shader, 0 );
 
   Actor actor4 = CreateActor( root, 0, TEST_LOCATION );
@@ -1785,7 +1999,7 @@ int UtcDaliRendererSetIndexRange(void)
   gl.EnableDrawCallTrace( true );
 
   Actor actor = Actor::New();
-  actor.SetSize( 100, 100 );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
 
   // create geometry
   Geometry geometry = Geometry::New();
@@ -1814,7 +2028,7 @@ int UtcDaliRendererSetIndexRange(void)
   };
   Property::Map vertexFormat;
   vertexFormat["aPosition"] = Property::VECTOR2;
-  PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat );
+  VertexBuffer vertexBuffer = VertexBuffer::New( vertexFormat );
   vertexBuffer.SetData( shapes, sizeof(shapes)/sizeof(shapes[0]));
 
   // --------------------------------------------------------------------------
@@ -1826,8 +2040,8 @@ int UtcDaliRendererSetIndexRange(void)
   Renderer renderer = Renderer::New( geometry, shader );
   actor.AddRenderer( renderer );
 
-  Stage stage = Stage::GetCurrent();
-  stage.Add( actor );
+  Integration::Scene scene = application.GetScene();
+  scene.Add( actor );
 
   char buffer[ 128 ];
 
@@ -1836,6 +2050,24 @@ int UtcDaliRendererSetIndexRange(void)
     renderer.SetIndexRange( 0, 5 );
     application.SendNotification();
     application.Render();
+
+    Property::Value value = renderer.GetProperty( Renderer::Property::INDEX_RANGE_FIRST );
+    int convertedValue;
+    DALI_TEST_CHECK( value.Get( convertedValue ) );
+    DALI_TEST_CHECK( convertedValue == 0 );
+
+    value = renderer.GetCurrentProperty( Renderer::Property::INDEX_RANGE_FIRST );
+    DALI_TEST_CHECK( value.Get( convertedValue ) );
+    DALI_TEST_CHECK( convertedValue == 0 );
+
+    value = renderer.GetProperty( Renderer::Property::INDEX_RANGE_COUNT );
+    DALI_TEST_CHECK( value.Get( convertedValue ) );
+    DALI_TEST_CHECK( convertedValue == 5 );
+
+    value = renderer.GetCurrentProperty( Renderer::Property::INDEX_RANGE_COUNT );
+    DALI_TEST_CHECK( value.Get( convertedValue ) );
+    DALI_TEST_CHECK( convertedValue == 5 );
+
     sprintf( buffer, "%u, 5, %u, indices", GL_LINE_LOOP, GL_UNSIGNED_SHORT );
     bool result = gl.GetDrawTrace().FindMethodAndParams( "DrawElements" , buffer );
     DALI_TEST_CHECK( result );
@@ -1900,10 +2132,10 @@ int UtcDaliRendererSetDepthFunction(void)
 
   Actor actor = Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage stage = Stage::GetCurrent();
-  stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
-  stage.Add(actor);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  Integration::Scene scene = application.GetScene();
+  scene.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+  scene.Add(actor);
 
   TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
   glAbstraction.EnableEnableDisableCallTrace(true);
@@ -2034,15 +2266,31 @@ int UtcDaliRendererSetDepthFunction(void)
  *  - Check it was set.
  */
 template< typename T >
-void CheckEnumerationProperty( Renderer& renderer, Property::Index propertyIndex, T initialValue, T firstCheckEnumeration, T secondCheckEnumeration, std::string secondCheckString )
+void CheckEnumerationProperty( TestApplication& application, Renderer& renderer, Property::Index propertyIndex, T initialValue, T firstCheckEnumeration, T secondCheckEnumeration, std::string secondCheckString )
 {
+  application.SendNotification();
+  application.Render();
+
   DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( initialValue ) );
   DALI_TEST_CHECK( renderer.GetCurrentProperty< int >( propertyIndex ) == static_cast<int>( initialValue ) );
   renderer.SetProperty( propertyIndex, firstCheckEnumeration );
   DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( firstCheckEnumeration ) );
+  DALI_TEST_CHECK( renderer.GetCurrentProperty< int >( propertyIndex ) != static_cast<int>( firstCheckEnumeration ) );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( firstCheckEnumeration ) );
   DALI_TEST_CHECK( renderer.GetCurrentProperty< int >( propertyIndex ) == static_cast<int>( firstCheckEnumeration ) );
+
   renderer.SetProperty( propertyIndex, secondCheckString );
   DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( secondCheckEnumeration ) );
+  DALI_TEST_CHECK( renderer.GetCurrentProperty< int >( propertyIndex ) != static_cast<int>( secondCheckEnumeration ) );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK( renderer.GetProperty<int>( propertyIndex ) == static_cast<int>( secondCheckEnumeration ) );
   DALI_TEST_CHECK( renderer.GetCurrentProperty< int >( propertyIndex ) == static_cast<int>( secondCheckEnumeration ) );
 }
 
@@ -2055,27 +2303,32 @@ int UtcDaliRendererEnumProperties(void)
   Shader shader = CreateShader();
   Renderer renderer = Renderer::New( geometry, shader );
 
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add(actor);
+
   /*
    * Here we use a templatized function to perform several checks on each enumeration property.
    * @see CheckEnumerationProperty for details of the checks performed.
    */
 
-  CheckEnumerationProperty< FaceCullingMode::Type >( renderer, Renderer::Property::FACE_CULLING_MODE, FaceCullingMode::NONE, FaceCullingMode::FRONT, FaceCullingMode::BACK, "BACK" );
-  CheckEnumerationProperty< BlendMode::Type >( renderer, Renderer::Property::BLEND_MODE, BlendMode::AUTO, BlendMode::OFF, BlendMode::ON, "ON" );
-  CheckEnumerationProperty< BlendEquation::Type >( renderer, Renderer::Property::BLEND_EQUATION_RGB, BlendEquation::ADD, BlendEquation::SUBTRACT, BlendEquation::REVERSE_SUBTRACT, "REVERSE_SUBTRACT" );
-  CheckEnumerationProperty< BlendEquation::Type >( renderer, Renderer::Property::BLEND_EQUATION_ALPHA, BlendEquation::ADD, BlendEquation::SUBTRACT, BlendEquation::REVERSE_SUBTRACT, "REVERSE_SUBTRACT" );
-  CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
-  CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_DEST_RGB, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
-  CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_SRC_ALPHA, BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::SRC_COLOR, "SRC_COLOR" );
-  CheckEnumerationProperty< BlendFactor::Type >( renderer, Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
-  CheckEnumerationProperty< DepthWriteMode::Type >( renderer, Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::AUTO, DepthWriteMode::OFF, DepthWriteMode::ON, "ON" );
-  CheckEnumerationProperty< DepthFunction::Type >( renderer, Renderer::Property::DEPTH_FUNCTION, DepthFunction::LESS, DepthFunction::ALWAYS, DepthFunction::GREATER, "GREATER" );
-  CheckEnumerationProperty< DepthTestMode::Type >( renderer, Renderer::Property::DEPTH_TEST_MODE, DepthTestMode::AUTO, DepthTestMode::OFF, DepthTestMode::ON, "ON" );
-  CheckEnumerationProperty< StencilFunction::Type >( renderer, Renderer::Property::STENCIL_FUNCTION, StencilFunction::ALWAYS, StencilFunction::LESS, StencilFunction::EQUAL, "EQUAL" );
-  CheckEnumerationProperty< RenderMode::Type >( renderer, Renderer::Property::RENDER_MODE, RenderMode::AUTO, RenderMode::NONE, RenderMode::STENCIL, "STENCIL" );
-  CheckEnumerationProperty< StencilOperation::Type >( renderer, Renderer::Property::STENCIL_OPERATION_ON_FAIL, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
-  CheckEnumerationProperty< StencilOperation::Type >( renderer, Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
-  CheckEnumerationProperty< StencilOperation::Type >( renderer, Renderer::Property::STENCIL_OPERATION_ON_Z_PASS, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
+  CheckEnumerationProperty< FaceCullingMode::Type >( application, renderer, Renderer::Property::FACE_CULLING_MODE, FaceCullingMode::NONE, FaceCullingMode::FRONT, FaceCullingMode::BACK, "BACK" );
+  CheckEnumerationProperty< BlendMode::Type >( application, renderer, Renderer::Property::BLEND_MODE, BlendMode::AUTO, BlendMode::OFF, BlendMode::ON, "ON" );
+  CheckEnumerationProperty< BlendEquation::Type >( application, renderer, Renderer::Property::BLEND_EQUATION_RGB, BlendEquation::ADD, BlendEquation::SUBTRACT, BlendEquation::REVERSE_SUBTRACT, "REVERSE_SUBTRACT" );
+  CheckEnumerationProperty< BlendEquation::Type >( application, renderer, Renderer::Property::BLEND_EQUATION_ALPHA, BlendEquation::ADD, BlendEquation::SUBTRACT, BlendEquation::REVERSE_SUBTRACT, "REVERSE_SUBTRACT" );
+  CheckEnumerationProperty< BlendFactor::Type >( application, renderer, Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+  CheckEnumerationProperty< BlendFactor::Type >( application, renderer, Renderer::Property::BLEND_FACTOR_DEST_RGB, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+  CheckEnumerationProperty< BlendFactor::Type >( application, renderer, Renderer::Property::BLEND_FACTOR_SRC_ALPHA, BlendFactor::ONE, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+  CheckEnumerationProperty< BlendFactor::Type >( application, renderer, Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE_MINUS_SRC_ALPHA, BlendFactor::ONE, BlendFactor::SRC_COLOR, "SRC_COLOR" );
+  CheckEnumerationProperty< DepthWriteMode::Type >( application, renderer, Renderer::Property::DEPTH_WRITE_MODE, DepthWriteMode::AUTO, DepthWriteMode::OFF, DepthWriteMode::ON, "ON" );
+  CheckEnumerationProperty< DepthFunction::Type >( application, renderer, Renderer::Property::DEPTH_FUNCTION, DepthFunction::LESS, DepthFunction::ALWAYS, DepthFunction::GREATER, "GREATER" );
+  CheckEnumerationProperty< DepthTestMode::Type >( application, renderer, Renderer::Property::DEPTH_TEST_MODE, DepthTestMode::AUTO, DepthTestMode::OFF, DepthTestMode::ON, "ON" );
+  CheckEnumerationProperty< StencilFunction::Type >( application, renderer, Renderer::Property::STENCIL_FUNCTION, StencilFunction::ALWAYS, StencilFunction::LESS, StencilFunction::EQUAL, "EQUAL" );
+  CheckEnumerationProperty< RenderMode::Type >( application, renderer, Renderer::Property::RENDER_MODE, RenderMode::AUTO, RenderMode::NONE, RenderMode::STENCIL, "STENCIL" );
+  CheckEnumerationProperty< StencilOperation::Type >( application, renderer, Renderer::Property::STENCIL_OPERATION_ON_FAIL, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
+  CheckEnumerationProperty< StencilOperation::Type >( application, renderer, Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
+  CheckEnumerationProperty< StencilOperation::Type >( application, renderer, Renderer::Property::STENCIL_OPERATION_ON_Z_PASS, StencilOperation::KEEP, StencilOperation::REPLACE, StencilOperation::INCREMENT, "INCREMENT" );
 
   END_TEST;
 }
@@ -2088,10 +2341,10 @@ Renderer RendererTestFixture( TestApplication& application )
 
   Actor actor = Actor::New();
   actor.AddRenderer( renderer );
-  actor.SetSize( 400.0f, 400.0f );
-  Stage stage = Stage::GetCurrent();
-  stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
-  stage.Add( actor );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  Integration::Scene scene = application.GetScene();
+  scene.GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_3D );
+  scene.Add( actor );
 
   return renderer;
 }
@@ -2137,9 +2390,9 @@ int UtcDaliRendererSetDepthTestMode(void)
   DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetDepthTestString() ) );
   DALI_TEST_CHECK( !glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
 
-  // Change the layer behavior to LAYER_2D.
+  // Change the layer behavior to LAYER_UI.
   // Note this will also disable depth testing for the layer by default, we test this first.
-  Stage::GetCurrent().GetRootLayer().SetBehavior( Layer::LAYER_2D );
+  application.GetScene().GetRootLayer().SetProperty( Layer::Property::BEHAVIOR, Layer::LAYER_UI );
 
   glEnableDisableStack.Reset();
   application.SendNotification();
@@ -2149,7 +2402,7 @@ int UtcDaliRendererSetDepthTestMode(void)
   DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Disable", GetDepthTestString() ) );
 
   // Turn the layer depth-test flag back on, and confirm that depth testing is now on.
-  Stage::GetCurrent().GetRootLayer().SetDepthTestDisabled( false );
+  application.GetScene().GetRootLayer().SetProperty(Layer::Property::DEPTH_TEST, true );
 
   glEnableDisableStack.Reset();
   application.SendNotification();
@@ -2278,6 +2531,8 @@ int UtcDaliRendererSetRenderModeToUseStencilBuffer(void)
   renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR );
   ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
   renderer.SetProperty( Renderer::Property::RENDER_MODE, RenderMode::COLOR_STENCIL );
+  // Set a different stencil function as the last one is cached.
+  renderer.SetProperty( Renderer::Property::STENCIL_FUNCTION, StencilFunction::ALWAYS );
   ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
 
   DALI_TEST_CHECK( glEnableDisableStack.FindMethodAndParams( "Enable", GetStencilTestString() ) );
@@ -2388,6 +2643,8 @@ int UtcDaliRendererSetStencilFunction(void)
 
   ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
 
+  DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetCurrentProperty( Renderer::Property::STENCIL_FUNCTION_REFERENCE ).Get<int>() ), testValueReference, TEST_LOCATION );
+
   std::stringstream parameterStream;
   parameterStream << StencilFunctionLookupTable[ StencilOperation::DECREMENT_WRAP ] << ", " << testValueReference << ", 255";
 
@@ -2403,6 +2660,8 @@ int UtcDaliRendererSetStencilFunction(void)
 
   ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
 
+  DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetCurrentProperty( Renderer::Property::STENCIL_FUNCTION_MASK ).Get<int>() ), testValueMask, TEST_LOCATION );
+
   // Clear the stringstream.
   parameterStream.str( std::string() );
   parameterStream << StencilFunctionLookupTable[ StencilOperation::DECREMENT_WRAP ] << ", " << testValueReference << ", " << testValueMask;
@@ -2443,7 +2702,7 @@ int UtcDaliRendererSetStencilOperation(void)
   }; const int StencilOperationLookupTableCount = sizeof( StencilOperationLookupTable ) / sizeof( StencilOperationLookupTable[0] );
 
   // Set all 3 StencilOperation properties to a default.
-  renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_FAIL, StencilOperation::ZERO );
+  renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_FAIL, StencilOperation::KEEP );
   renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, StencilOperation::ZERO );
   renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_Z_PASS, StencilOperation::ZERO );
 
@@ -2459,40 +2718,48 @@ int UtcDaliRendererSetStencilOperation(void)
    *  - Checks the correct parameters to "glStencilFunc" were used
    *  - Checks the above for all 3 parameter placements of StencilOperation ( OnFail, OnZFail, OnPass )
    */
-  int stencilOperationPropertyKeys[] = { Renderer::Property::STENCIL_OPERATION_ON_FAIL, Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, Renderer::Property::STENCIL_OPERATION_ON_Z_PASS };
   std::string methodString( "StencilOp" );
 
-  for( int parameterIndex = 0; parameterIndex < 3; ++parameterIndex )
+  for( int i = 0; i < StencilOperationLookupTableCount; ++i )
   {
-    for( int i = 0; i < StencilOperationLookupTableCount; ++i )
+    for( int j = 0; j < StencilOperationLookupTableCount; ++j )
     {
-      // Set the property (outer loop causes all 3 different properties to be set separately).
-      renderer.SetProperty( stencilOperationPropertyKeys[ parameterIndex ], static_cast<Dali::StencilFunction::Type>( i ) );
-
-      // Check GetProperty returns the same value.
-      DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetProperty( stencilOperationPropertyKeys[ parameterIndex ] ).Get<int>() ), i, TEST_LOCATION );
-
-      // Reset the trace debug.
-      ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
-
-      // Check the function is called and the parameters are correct.
-      // Set the expected parameter value at its correct index (only)
-      parameters[ parameterIndex ] = StencilOperationLookupTable[ i ];
-
-      // Build the parameter list.
-      std::stringstream parameterStream;
-      for( int parameterBuild = 0; parameterBuild < 3; ++parameterBuild )
+      for( int k = 0; k < StencilOperationLookupTableCount; ++k )
       {
-        parameterStream << parameters[ parameterBuild ];
-        // Comma-separate the parameters.
-        if( parameterBuild < 2 )
+        // Set the property (outer loop causes all 3 different properties to be set separately).
+        renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_FAIL, static_cast<Dali::StencilFunction::Type>( i ) );
+        renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL, static_cast<Dali::StencilFunction::Type>( j ) );
+        renderer.SetProperty( Renderer::Property::STENCIL_OPERATION_ON_Z_PASS, static_cast<Dali::StencilFunction::Type>( k ) );
+
+        // Check GetProperty returns the same value.
+        DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetProperty( Renderer::Property::STENCIL_OPERATION_ON_FAIL ).Get<int>() ), i, TEST_LOCATION );
+        DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetProperty( Renderer::Property::STENCIL_OPERATION_ON_Z_FAIL ).Get<int>() ), j, TEST_LOCATION );
+        DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetProperty( Renderer::Property::STENCIL_OPERATION_ON_Z_PASS ).Get<int>() ), k, TEST_LOCATION );
+
+        // Reset the trace debug.
+        ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
+
+        // Check the function is called and the parameters are correct.
+        // Set the expected parameter value at its correct index (only)
+        parameters[ 0u ] = StencilOperationLookupTable[ i ];
+        parameters[ 1u ] = StencilOperationLookupTable[ j ];
+        parameters[ 2u ] = StencilOperationLookupTable[ k ];
+
+        // Build the parameter list.
+        std::stringstream parameterStream;
+        for( int parameterBuild = 0; parameterBuild < 3; ++parameterBuild )
         {
-          parameterStream << ", ";
+          parameterStream << parameters[ parameterBuild ];
+          // Comma-separate the parameters.
+          if( parameterBuild < 2 )
+          {
+            parameterStream << ", ";
+          }
         }
-      }
 
-      // Check the function was called and the parameters were correct.
-      DALI_TEST_CHECK( glStencilFunctionStack.FindMethodAndParams( methodString, parameterStream.str() ) );
+        // Check the function was called and the parameters were correct.
+        DALI_TEST_CHECK( glStencilFunctionStack.FindMethodAndParams( methodString, parameterStream.str() ) );
+      }
     }
   }
 
@@ -2522,6 +2789,8 @@ int UtcDaliRendererSetStencilMask(void)
 
   ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
 
+  DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetCurrentProperty( Renderer::Property::STENCIL_MASK ).Get<int>() ), 0x00, TEST_LOCATION );
+
   std::string methodString( "StencilMask" );
   std::string parameterString = "0";
 
@@ -2536,6 +2805,8 @@ int UtcDaliRendererSetStencilMask(void)
 
   ResetDebugAndFlush( application, glEnableDisableStack, glStencilFunctionStack );
 
+  DALI_TEST_EQUALS<int>( static_cast<int>( renderer.GetCurrentProperty( Renderer::Property::STENCIL_MASK ).Get<int>() ), 0xFF, TEST_LOCATION );
+
   parameterString = "255";
 
   // Check the function was called and the parameters were correct.
@@ -2564,9 +2835,9 @@ int UtcDaliRendererWrongNumberOfTextures(void)
 
   Actor actor= Actor::New();
   actor.AddRenderer(renderer);
-  actor.SetPosition(0.0f,0.0f);
-  actor.SetSize(100, 100);
-  Stage::GetCurrent().Add(actor);
+  actor.SetProperty( Actor::Property::POSITION, Vector2(0.0f,0.0f));
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+  application.GetScene().Add(actor);
 
   TestGlAbstraction& gl = application.GetGlAbstraction();
   TraceCallStack& drawTrace = gl.GetDrawTrace();
@@ -2593,3 +2864,406 @@ int UtcDaliRendererWrongNumberOfTextures(void)
 
   END_TEST;
 }
+
+int UtcDaliRendererOpacity(void)
+{
+  TestApplication application;
+
+  tet_infoline( "Test OPACITY property" );
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer( renderer );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+  application.GetScene().Add( actor );
+
+  Property::Value value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
+  float opacity;
+  DALI_TEST_CHECK( value.Get( opacity ) );
+  DALI_TEST_EQUALS( opacity, 1.0f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector4 actualValue;
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  DALI_TEST_CHECK( gl.GetUniformValue< Vector4 >( "uColor", actualValue ) );
+  DALI_TEST_EQUALS( actualValue.a, 1.0f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  renderer.SetProperty( DevelRenderer::Property::OPACITY, 0.5f );
+
+  application.SendNotification();
+  application.Render();
+
+  value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
+  DALI_TEST_CHECK( value.Get( opacity ) );
+  DALI_TEST_EQUALS( opacity, 0.5f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  value = renderer.GetCurrentProperty( DevelRenderer::Property::OPACITY );
+  DALI_TEST_CHECK( value.Get( opacity ) );
+  DALI_TEST_EQUALS( opacity, 0.5f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  DALI_TEST_CHECK( gl.GetUniformValue< Vector4 >( "uColor", actualValue ) );
+  DALI_TEST_EQUALS( actualValue.a, 0.5f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererOpacityAnimation(void)
+{
+  TestApplication application;
+
+  tet_infoline( "Test OPACITY property animation" );
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer( renderer );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+  application.GetScene().Add( actor );
+
+  application.SendNotification();
+  application.Render(0);
+
+  Property::Value value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
+  float opacity;
+  DALI_TEST_CHECK( value.Get( opacity ) );
+  DALI_TEST_EQUALS( opacity, 1.0f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  Animation animation = Animation::New( 1.0f );
+  animation.AnimateTo( Property( renderer, DevelRenderer::Property::OPACITY ), 0.0f );
+  animation.Play();
+
+  application.SendNotification();
+  application.Render( 1000 );
+
+  value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
+  DALI_TEST_CHECK( value.Get( opacity ) );
+  DALI_TEST_EQUALS( opacity, 0.0f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  // Need to clear the animation before setting the property as the animation value is baked and will override any previous setters
+  animation.Clear();
+  renderer.SetProperty( DevelRenderer::Property::OPACITY, 0.1f );
+
+  animation.AnimateBy( Property( renderer, DevelRenderer::Property::OPACITY ), 0.5f );
+  animation.Play();
+
+  application.SendNotification();
+  application.Render( 1000 );
+
+  value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
+  DALI_TEST_CHECK( value.Get( opacity ) );
+  DALI_TEST_EQUALS( opacity, 0.6f, Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+  DALI_TEST_EQUALS( opacity, renderer.GetCurrentProperty( DevelRenderer::Property::OPACITY ).Get< float >(), Dali::Math::MACHINE_EPSILON_1, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererInvalidProperty(void)
+{
+  TestApplication application;
+
+  tet_infoline( "Test invalid property" );
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer( renderer );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  application.GetScene().Add( actor );
+
+  application.SendNotification();
+  application.Render(0);
+
+  Property::Value value = renderer.GetProperty( Renderer::Property::DEPTH_INDEX + 100 );
+  DALI_TEST_CHECK( value.GetType() == Property::Type::NONE );
+
+  value = renderer.GetCurrentProperty( Renderer::Property::DEPTH_INDEX + 100 );
+  DALI_TEST_CHECK( value.GetType() == Property::Type::NONE );
+
+  END_TEST;
+}
+
+int UtcDaliRendererRenderingBehavior(void)
+{
+  TestApplication application;
+
+  tet_infoline( "Test RENDERING_BEHAVIOR property" );
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer( renderer );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+  application.GetScene().Add( actor );
+
+  Property::Value value = renderer.GetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR );
+  int renderingBehavior;
+  DALI_TEST_CHECK( value.Get( renderingBehavior ) );
+  DALI_TEST_EQUALS( static_cast< DevelRenderer::Rendering::Type >( renderingBehavior ), DevelRenderer::Rendering::IF_REQUIRED, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render();
+
+  uint32_t updateStatus = application.GetUpdateStatus();
+
+  DALI_TEST_CHECK( !( updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING ) );
+
+  renderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::CONTINUOUSLY );
+
+  value = renderer.GetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR );
+  DALI_TEST_CHECK( value.Get( renderingBehavior ) );
+  DALI_TEST_EQUALS( static_cast< DevelRenderer::Rendering::Type >( renderingBehavior ), DevelRenderer::Rendering::CONTINUOUSLY, TEST_LOCATION );
+
+  // Render and check the update status
+  application.SendNotification();
+  application.Render();
+
+  updateStatus = application.GetUpdateStatus();
+
+  DALI_TEST_CHECK( updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING );
+
+  value = renderer.GetCurrentProperty( DevelRenderer::Property::RENDERING_BEHAVIOR );
+  DALI_TEST_CHECK( value.Get( renderingBehavior ) );
+  DALI_TEST_EQUALS( static_cast< DevelRenderer::Rendering::Type >( renderingBehavior ), DevelRenderer::Rendering::CONTINUOUSLY, TEST_LOCATION );
+
+  // Render again and check the update status
+  application.SendNotification();
+  application.Render();
+
+  updateStatus = application.GetUpdateStatus();
+
+  DALI_TEST_CHECK( updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING );
+
+  // Change rendering behavior
+  renderer.SetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR, DevelRenderer::Rendering::IF_REQUIRED );
+
+  // Render and check the update status
+  application.SendNotification();
+  application.Render();
+
+  updateStatus = application.GetUpdateStatus();
+
+  DALI_TEST_CHECK( !( updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererRegenerateUniformMap(void)
+{
+  TestApplication application;
+
+  tet_infoline( "Test regenerating uniform map when attaching renderer to the node" );
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  Renderer renderer = Renderer::New( geometry, shader );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer( renderer );
+  actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+  actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+  application.GetScene().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  actor.RemoveRenderer( renderer );
+  shader = Shader::New( "vertexSrc", "fragmentSrc" );
+  shader.RegisterProperty( "opacity", 0.5f );
+  renderer.SetShader( shader );
+
+  Stage::GetCurrent().KeepRendering( 1.0f );
+
+  // Update for several frames
+  application.SendNotification();
+  application.Render();
+  application.SendNotification();
+  application.Render();
+  application.SendNotification();
+  application.Render();
+  application.SendNotification();
+  application.Render();
+
+  // Add Renderer
+  actor.AddRenderer( renderer );
+  application.SendNotification();
+  application.Render();
+
+  // Nothing to test here, the test must not crash
+  auto updateStatus = application.GetUpdateStatus();
+  DALI_TEST_CHECK( updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING );
+
+  END_TEST;
+}
+
+int UtcDaliRendererAddDrawCommands(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test adding draw commands to the renderer");
+
+  TestGlAbstraction &glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader   shader   = Shader::New("vertexSrc", "fragmentSrc");
+  Renderer renderer = Renderer::New(geometry, shader);
+
+  renderer.SetProperty( Renderer::Property::BLEND_MODE, Dali::BlendMode::ON );
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetProperty(Actor::Property::SIZE, Vector2(400.0f, 400.0f));
+  actor.SetProperty(Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 1.0f));
+  application.GetScene().Add(actor);
+
+  // Expect delivering a single draw call
+  auto &drawTrace = glAbstraction.GetDrawTrace();
+  drawTrace.Reset();
+  drawTrace.Enable(true);
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION );
+
+  auto drawCommand1 = DevelRenderer::DrawCommand{};
+  drawCommand1.drawType     = DevelRenderer::DrawType::INDEXED;
+  drawCommand1.firstIndex   = 0;
+  drawCommand1.elementCount = 2;
+  drawCommand1.queue        = DevelRenderer::RENDER_QUEUE_OPAQUE;
+
+  auto drawCommand2 = DevelRenderer::DrawCommand{};
+  drawCommand2.drawType     = DevelRenderer::DrawType::INDEXED;
+  drawCommand2.firstIndex   = 2;
+  drawCommand2.elementCount = 2;
+  drawCommand2.queue        = DevelRenderer::RENDER_QUEUE_TRANSPARENT;
+
+  auto drawCommand3 = DevelRenderer::DrawCommand{};
+  drawCommand3.drawType     = DevelRenderer::DrawType::ARRAY;
+  drawCommand3.firstIndex   = 2;
+  drawCommand3.elementCount = 2;
+  drawCommand3.queue        = DevelRenderer::RENDER_QUEUE_OPAQUE;
+
+  DevelRenderer::AddDrawCommand(renderer, drawCommand1);
+  DevelRenderer::AddDrawCommand(renderer, drawCommand2);
+  DevelRenderer::AddDrawCommand(renderer, drawCommand3);
+
+  drawTrace.Reset();
+  drawTrace.Enable(true);
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 3, TEST_LOCATION);
+
+  END_TEST;
+}
+int UtcDaliRendererSetGeometryNegative(void)
+{
+  TestApplication application;
+  Dali::Renderer instance;
+  try
+  {
+    Dali::Geometry arg1;
+    instance.SetGeometry(arg1);
+    DALI_TEST_CHECK(false); // Should not get here
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // We expect an assert
+  }
+  END_TEST;
+}
+
+int UtcDaliRendererSetTexturesNegative(void)
+{
+  TestApplication application;
+  Dali::Renderer instance;
+  try
+  {
+    Dali::TextureSet arg1;
+    instance.SetTextures(arg1);
+    DALI_TEST_CHECK(false); // Should not get here
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // We expect an assert
+  }
+  END_TEST;
+}
+
+int UtcDaliRendererSetShaderNegative(void)
+{
+  TestApplication application;
+  Dali::Renderer instance;
+  try
+  {
+    Dali::Shader arg1;
+    instance.SetShader(arg1);
+    DALI_TEST_CHECK(false); // Should not get here
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // We expect an assert
+  }
+  END_TEST;
+}
+
+int UtcDaliRendererGetGeometryNegative(void)
+{
+  TestApplication application;
+  Dali::Renderer instance;
+  try
+  {
+    instance.GetGeometry();
+    DALI_TEST_CHECK(false); // Should not get here
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // We expect an assert
+  }
+  END_TEST;
+}
+
+int UtcDaliRendererGetTexturesNegative(void)
+{
+  TestApplication application;
+  Dali::Renderer instance;
+  try
+  {
+    instance.GetTextures();
+    DALI_TEST_CHECK(false); // Should not get here
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // We expect an assert
+  }
+  END_TEST;
+}
+
+int UtcDaliRendererGetShaderNegative(void)
+{
+  TestApplication application;
+  Dali::Renderer instance;
+  try
+  {
+    instance.GetShader();
+    DALI_TEST_CHECK(false); // Should not get here
+  }
+  catch(...)
+  {
+    DALI_TEST_CHECK(true); // We expect an assert
+  }
+  END_TEST;
+}