Merge "Add UserInteractionEnabled property on actor for controlling user interaction...
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Actor.cpp
index 53d13ab..9873aa7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -53,6 +53,7 @@ namespace
 bool gTouchCallBackCalled  = false;
 bool gTouchCallBackCalled2 = false;
 bool gTouchCallBackCalled3 = false;
+bool gHitTestTouchCallBackCalled = false;
 
 bool gHoverCallBackCalled = false;
 
@@ -112,6 +113,13 @@ static bool TestTouchCallback3(Actor, const TouchEvent&)
   END_TEST;
 }
 
+static bool TestHitTestTouchCallback(Actor, const TouchEvent&)
+{
+  gHitTestTouchCallBackCalled = true;
+  return false;
+  END_TEST;
+}
+
 static void ResetTouchCallbacks()
 {
   gTouchCallBackCalled  = false;
@@ -2550,6 +2558,77 @@ int UtcDaliActorIsKeyboardFocusable(void)
   END_TEST;
 }
 
+int UtcDaliActorSetKeyboardFocusableChildren(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  actor.SetProperty(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN, true);
+  DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN) == true);
+
+  actor.SetProperty(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN, false);
+  DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN) == false);
+  END_TEST;
+}
+
+int UtcDaliActorAreChildrenKeyBoardFocusable(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN) == true);
+  END_TEST;
+}
+
+int UtcDaliActorSetTouchFocusable(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  actor.SetProperty(DevelActor::Property::TOUCH_FOCUSABLE, true);
+  DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::TOUCH_FOCUSABLE) == true);
+
+  actor.SetProperty(DevelActor::Property::TOUCH_FOCUSABLE, false);
+  DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::TOUCH_FOCUSABLE) == false);
+  END_TEST;
+}
+
+int UtcDaliActorIsTouchFocusable(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::TOUCH_FOCUSABLE) == false);
+  END_TEST;
+}
+
+int UtcDaliActorSetUserInteractionEnabled(void)
+{
+  TestApplication application;
+  Actor           actor = Actor::New();
+
+  bool enabled = !actor.GetProperty<bool>(DevelActor::Property::USER_INTERACTION_ENABLED);
+
+  actor.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, enabled);
+
+  DALI_TEST_CHECK(enabled == actor.GetProperty<bool>(DevelActor::Property::USER_INTERACTION_ENABLED));
+  END_TEST;
+}
+
+int UtcDaliActorIsUserInteractionEnabled(void)
+{
+  TestApplication application;
+  Actor           actor = Actor::New();
+  actor.SetProperty(DevelActor::Property::USER_INTERACTION_ENABLED, true);
+
+  DALI_TEST_CHECK(true == actor.GetProperty<bool>(DevelActor::Property::USER_INTERACTION_ENABLED));
+  END_TEST;
+}
+
 int UtcDaliActorRemoveConstraints(void)
 {
   tet_infoline(" UtcDaliActorRemoveConstraints");
@@ -4897,8 +4976,6 @@ int UtcDaliActorPropertyClippingActorWithRendererOverride(void)
 
   // Check stencil functions are not called.
   DALI_TEST_CHECK(!stencilTrace.FindMethod("StencilFunc"));
-  // TODO: Temporarily commented out the line below when caching is disabled. Will need to add it back.
-  //  DALI_TEST_CHECK(!stencilTrace.FindMethod("StencilMask"));
   DALI_TEST_CHECK(!stencilTrace.FindMethod("StencilOp"));
 
   // Check that scissor clipping is overriden by the renderer properties.
@@ -4919,6 +4996,64 @@ int UtcDaliActorPropertyClippingActorWithRendererOverride(void)
   END_TEST;
 }
 
+int UtcDaliActorPropertyClippingActorCulled(void)
+{
+  // This test checks that child actors are clipped by an culled parent actor.
+  tet_infoline("Testing child actors are clipped by an culled parent actor");
+  TestApplication application;
+
+  TestGlAbstraction& glAbstraction       = application.GetGlAbstraction();
+  TraceCallStack&    scissorTrace        = glAbstraction.GetScissorTrace();
+  TraceCallStack&    enabledDisableTrace = glAbstraction.GetEnableDisableTrace();
+
+  const Vector2 actorSize(160.0f, 160.0f);
+
+  // Create a clipping actor.
+  Actor clippingActorA                  = CreateRenderableActor();
+  clippingActorA[Actor::Property::SIZE] = actorSize;
+
+  // Note: Scissor coords are have flipped Y values compared with DALi's coordinate system.
+  // We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test.
+  clippingActorA[Actor::Property::PARENT_ORIGIN] = ParentOrigin::BOTTOM_LEFT;
+  clippingActorA[Actor::Property::ANCHOR_POINT]  = AnchorPoint::BOTTOM_LEFT;
+  clippingActorA[Actor::Property::CLIPPING_MODE] = ClippingMode::CLIP_TO_BOUNDING_BOX;
+  application.GetScene().Add(clippingActorA);
+
+  // Create a child actor
+  Actor childActor                              = CreateRenderableActor();
+  childActor[Actor::Property::PARENT_ORIGIN]    = ParentOrigin::BOTTOM_LEFT;
+  childActor[Actor::Property::ANCHOR_POINT]     = AnchorPoint::BOTTOM_LEFT;
+  childActor[Actor::Property::SIZE]             = Vector2(50.0f, 50.0f);
+  childActor[Actor::Property::INHERIT_POSITION] = false;
+
+  // Gather the call trace.
+  GenerateTrace(application, enabledDisableTrace, scissorTrace);
+
+  // Check scissor test was enabled.
+  std::ostringstream scissor;
+  scissor << std::hex << GL_SCISSOR_TEST;
+  DALI_TEST_CHECK(enabledDisableTrace.FindMethodAndParams("Enable", scissor.str()));
+
+  // Check the scissor was set, and the coordinates are correct.
+  std::stringstream compareParametersString;
+  compareParametersString << "0, 0, " << actorSize.x << ", " << actorSize.y;
+  DALI_TEST_CHECK(scissorTrace.FindMethodAndParams("Scissor", compareParametersString.str())); // Compare with 0, 0, 16, 16
+
+  // Move the clipping actor out of screen
+  clippingActorA[Actor::Property::POSITION] = Vector2(2000.0f, 2000.0f);
+
+  // Gather the call trace.
+  GenerateTrace(application, enabledDisableTrace, scissorTrace);
+
+  // Check the scissor was set, and the coordinates are correct.
+  compareParametersString.str(std::string());
+  compareParametersString.clear();
+  compareParametersString << 2000 << ", " << 0 << ", " << 0 << ", " << 0;
+  DALI_TEST_CHECK(scissorTrace.FindMethodAndParams("Scissor", compareParametersString.str())); // Clipping area should be empty.
+
+  END_TEST;
+}
+
 int UtcDaliGetPropertyN(void)
 {
   tet_infoline("Testing Actor::GetProperty returns a non valid value if property index is out of range");
@@ -7692,12 +7827,12 @@ int UtcDaliActorSwitchParentP(void)
   Actor parent2 = Actor::New();
   application.GetScene().Add(parent2);
 
-  bool  addSignalReceived = false;
+  bool                  addSignalReceived = false;
   ChildAddedSignalCheck addedSignal(addSignalReceived, child);
   DevelActor::ChildAddedSignal(application.GetScene().GetRootLayer()).Connect(&application, addedSignal);
   DALI_TEST_EQUALS(addSignalReceived, false, TEST_LOCATION);
 
-  bool  removedSignalReceived = false;
+  bool                    removedSignalReceived = false;
   ChildRemovedSignalCheck removedSignal(removedSignalReceived, child);
   DevelActor::ChildRemovedSignal(application.GetScene().GetRootLayer()).Connect(&application, removedSignal);
   DALI_TEST_EQUALS(removedSignalReceived, false, TEST_LOCATION);
@@ -8017,6 +8152,139 @@ int utcDaliActorGetSizeAfterAnimation(void)
   END_TEST;
 }
 
+int utcDaliActorRelayoutAndAnimation(void)
+{
+  TestApplication application;
+  tet_infoline("Check the actor size when relayoutting and playing animation");
+
+  Vector3 parentSize(300.0f, 300.0f, 0.0f);
+  Vector3 actorSize(100.0f, 100.0f, 0.0f);
+
+  {
+    Actor parentA = Actor::New();
+    parentA.SetProperty(Actor::Property::SIZE, parentSize);
+    parentA.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+    application.GetScene().Add(parentA);
+
+    Actor parentB = Actor::New();
+    parentB.SetProperty(Actor::Property::SIZE, parentSize);
+    parentB.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+    application.GetScene().Add(parentB);
+
+    Actor actor = Actor::New();
+    actor.SetProperty(Actor::Property::SIZE, actorSize);
+    actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+    parentA.Add(actor);
+
+    Vector3 size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    Vector3 targetValue(200.0f, 200.0f, 0.0f);
+
+    Animation animation = Animation::New(1.0f);
+    animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetValue);
+    animation.Play();
+
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    application.SendNotification();
+    application.Render(1100); // After the animation
+
+    // Size and current size should be updated.
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    Vector3 currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(currentSize, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    // Trigger relayout
+    parentB.Add(actor);
+
+    application.SendNotification();
+    application.Render();
+
+    // Size and current size should be same.
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(currentSize, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    actor.Unparent();
+    parentA.Unparent();
+    parentB.Unparent();
+  }
+
+  {
+    Actor parentA = Actor::New();
+    parentA.SetProperty(Actor::Property::SIZE, parentSize);
+    parentA.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+    application.GetScene().Add(parentA);
+
+    Actor parentB = Actor::New();
+    parentB.SetProperty(Actor::Property::SIZE, parentSize);
+    parentB.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+    application.GetScene().Add(parentB);
+
+    Actor actor = Actor::New();
+    actor.SetProperty(Actor::Property::SIZE, actorSize);
+    actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+    parentA.Add(actor);
+
+    Vector3 size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    application.SendNotification();
+    application.Render();
+
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    Vector3 currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(currentSize, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    Vector3 targetValue(200.0f, 200.0f, 0.0f);
+
+    // Make an animation
+    Animation animation = Animation::New(1.0f);
+    animation.AnimateTo(Property(actor, Actor::Property::SIZE), targetValue);
+    animation.Play();
+
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    application.SendNotification();
+    application.Render(1100); // After the animation
+
+    // Size and current size should be updated.
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(currentSize, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    // Trigger relayout
+    parentB.Add(actor);
+
+    application.SendNotification();
+    application.Render();
+
+    // Size and current size should be same.
+    size = actor.GetProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(size, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    currentSize = actor.GetCurrentProperty(Actor::Property::SIZE).Get<Vector3>();
+    DALI_TEST_EQUALS(currentSize, targetValue, Math::MACHINE_EPSILON_0, TEST_LOCATION);
+
+    actor.Unparent();
+    parentA.Unparent();
+    parentB.Unparent();
+  }
+
+  END_TEST;
+}
+
 int utcDaliActorPartialUpdate(void)
 {
   TestApplication application(
@@ -8038,6 +8306,8 @@ int utcDaliActorPartialUpdate(void)
 
   // First render pass, nothing to render, adaptor would just do swap buffer.
   DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
   Actor actor = CreateRenderableActor();
@@ -8143,6 +8413,8 @@ int utcDaliActorPartialUpdateSetColor(void)
 
   // First render pass, nothing to render, adaptor would just do swap buffer.
   DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
   Actor actor = CreateRenderableActor();
@@ -8238,6 +8510,8 @@ int utcDaliActorPartialUpdateSetProperty(void)
 
   // First render pass, nothing to render, adaptor would just do swap buffer.
   DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
   Texture image = CreateTexture(TextureType::TEXTURE_2D, Pixel::RGBA8888, 4u, 4u);
@@ -8350,6 +8624,31 @@ int utcDaliActorPartialUpdateTwoActors(void)
   DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
   DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
 
+  // Change a Renderer of actor1
+  Geometry geometry    = CreateQuadGeometry();
+  Shader   shader      = CreateShader();
+  Renderer newRenderer = Renderer::New(geometry, shader);
+  Renderer renderer    = actor.GetRendererAt(0);
+
+  actor.RemoveRenderer(renderer);
+  actor.AddRenderer(newRenderer);
+
+  damagedRects.clear();
+
+  application.SendNotification();
+  application.PreRenderWithPartialUpdate(TestApplication::DEFAULT_RENDER_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_CHECK(damagedRects.size() > 0);
+  DALI_TEST_EQUALS<Rect<int>>(Rect<int>(64, 672, 64, 64), damagedRects[0], TEST_LOCATION);
+
+  // in screen coordinates, adaptor would calculate it using previous frames information
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
+
   END_TEST;
 }
 
@@ -8434,9 +8733,11 @@ int utcDaliActorPartialUpdateAnimation(void)
   DALI_TEST_EQUALS<Rect<int>>(expectedRect1, damagedRects[0], TEST_LOCATION);
   DALI_TEST_EQUALS<Rect<int>>(expectedRect2, damagedRects[1], TEST_LOCATION);
 
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
   damagedRects.clear();
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
@@ -8448,6 +8749,7 @@ int utcDaliActorPartialUpdateAnimation(void)
   application.SendNotification();
 
   damagedRects.clear();
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
@@ -8455,6 +8757,7 @@ int utcDaliActorPartialUpdateAnimation(void)
   damagedRects.clear();
 
   // In animation deley time
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
@@ -8465,6 +8768,7 @@ int utcDaliActorPartialUpdateAnimation(void)
   damagedRects.clear();
 
   // Also in animation deley time
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.PreRenderWithPartialUpdate(100, nullptr, damagedRects);
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
@@ -8492,15 +8796,17 @@ int utcDaliActorPartialUpdateAnimation(void)
   DALI_TEST_EQUALS<Rect<int>>(expectedRect2, damagedRects[0], TEST_LOCATION);
   DALI_TEST_EQUALS<Rect<int>>(expectedRect1, damagedRects[1], TEST_LOCATION);
 
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
-  // Finished animation, but the actior was already unparented
+  // Finished animation, but the actor was already unparented
   damagedRects.clear();
   application.PreRenderWithPartialUpdate(500, nullptr, damagedRects);
 
   DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
   DALI_TEST_EQUALS<Rect<int>>(expectedRect2, damagedRects[0], TEST_LOCATION);
 
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
   application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
   END_TEST;
@@ -8672,77 +8978,585 @@ int utcDaliActorPartialUpdateOnOffScene(void)
   END_TEST;
 }
 
-int UtcDaliActorCaptureAllTouchAfterStartPropertyP(void)
+int utcDaliActorPartialUpdateSkipRendering(void)
 {
-  TestApplication application;
+  TestApplication application(
+    TestApplication::DEFAULT_SURFACE_WIDTH,
+    TestApplication::DEFAULT_SURFACE_HEIGHT,
+    TestApplication::DEFAULT_HORIZONTAL_DPI,
+    TestApplication::DEFAULT_VERTICAL_DPI,
+    true,
+    true);
 
-  Actor actor = Actor::New();
-  DALI_TEST_EQUALS(actor.GetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START).Get<bool>(), false, TEST_LOCATION);
-  actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, true);
-  DALI_TEST_EQUALS(actor.GetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START).Get<bool>(), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(actor.GetPropertyType(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), Property::BOOLEAN, TEST_LOCATION);
-  DALI_TEST_EQUALS(actor.IsPropertyWritable(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), true, TEST_LOCATION);
-  DALI_TEST_EQUALS(actor.IsPropertyAnimatable(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), false, TEST_LOCATION);
-  DALI_TEST_EQUALS(actor.IsPropertyAConstraintInput(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), false, TEST_LOCATION);
-  DALI_TEST_EQUALS(actor.GetPropertyName(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), "captureAllTouchAfterStart", TEST_LOCATION);
-  END_TEST;
-}
+  tet_infoline("Check to skip rendering in case of the empty damaged rect");
 
-int UtcDaliActorCaptureAllTouchAfterStartPropertyN(void)
-{
-  TestApplication application;
+  TraceCallStack& drawTrace = application.GetGlAbstraction().GetDrawTrace();
+  drawTrace.Enable(true);
+  drawTrace.Reset();
 
-  Actor actor = Actor::New();
+  Actor actor1 = CreateRenderableActor();
+  actor1.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  actor1.SetProperty(Actor::Property::SIZE, Vector3(80.0f, 80.0f, 0.0f));
+  application.GetScene().Add(actor1);
 
-  // Make sure setting invalid types does not cause a crash
-  try
-  {
-    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, 1.0f);
-    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector2::ONE);
-    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector3::ONE);
-    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector4::ONE);
-    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Property::Map());
-    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Property::Array());
-    tet_result(TET_PASS);
-  }
-  catch(...)
-  {
-    tet_result(TET_FAIL);
-  }
-  END_TEST;
-}
+  std::vector<Rect<int>> damagedRects;
+  Rect<int>              clippingRect;
+  Rect<int>              expectedRect1;
 
-int UtcDaliActorTouchAreaOffsetPropertyP(void)
-{
-  TestApplication application;
+  application.SendNotification();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
 
-  Actor     actor           = Actor::New();
-  Rect<int> touchAreaOffset = actor.GetProperty(DevelActor::Property::TOUCH_AREA_OFFSET).Get<Rect<int>>();
-  DALI_TEST_EQUALS(Rect<int>(0, 0, 0, 0), touchAreaOffset, TEST_LOCATION);
-  actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Rect<int>(10, 20, 30, 40));
-  touchAreaOffset = actor.GetProperty(DevelActor::Property::TOUCH_AREA_OFFSET).Get<Rect<int>>();
-  DALI_TEST_EQUALS(Rect<int>(10, 20, 30, 40), touchAreaOffset, TEST_LOCATION);
-  END_TEST;
-}
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
 
-int UtcDaliActorTouchAreaOffsetPropertyN(void)
-{
-  TestApplication application;
+  // Aligned by 16
+  expectedRect1 = Rect<int>(0, 720, 96, 96); // in screen coordinates, includes 3 last frames updates
+  DALI_TEST_EQUALS<Rect<int>>(expectedRect1, damagedRects[0], TEST_LOCATION);
 
-  Actor actor = Actor::New();
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
 
-  // Make sure setting invalid types does not cause a crash
-  try
-  {
-    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, 1.0f);
-    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Vector2::ONE);
-    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Vector3::ONE);
-    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Vector4::ONE);
-    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Property::Map());
-    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Property::Array());
-    tet_result(TET_PASS);
-  }
-  catch(...)
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
+
+  damagedRects.clear();
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Remove the actor
+  actor1.Unparent();
+
+  application.SendNotification();
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS<Rect<int>>(expectedRect1, damagedRects[0], TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Render again without any change
+  damagedRects.clear();
+  drawTrace.Reset();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  clippingRect = Rect<int>();
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Skip rendering
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 0, TEST_LOCATION);
+
+  // Add the actor again
+  application.GetScene().Add(actor1);
+
+  application.SendNotification();
+
+  damagedRects.clear();
+  drawTrace.Reset();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS<Rect<int>>(expectedRect1, damagedRects[0], TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int utcDaliActorPartialUpdate3DNode(void)
+{
+  TestApplication application(
+    TestApplication::DEFAULT_SURFACE_WIDTH,
+    TestApplication::DEFAULT_SURFACE_HEIGHT,
+    TestApplication::DEFAULT_HORIZONTAL_DPI,
+    TestApplication::DEFAULT_VERTICAL_DPI,
+    true,
+    true);
+
+  tet_infoline("Partial update should be ignored in case of 3d layer of 3d node");
+
+  TraceCallStack& drawTrace = application.GetGlAbstraction().GetDrawTrace();
+  drawTrace.Enable(true);
+  drawTrace.Reset();
+
+  Actor actor1 = CreateRenderableActor();
+  actor1.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  actor1.SetProperty(Actor::Property::SIZE, Vector3(80.0f, 80.0f, 0.0f));
+  application.GetScene().Add(actor1);
+
+  std::vector<Rect<int>> damagedRects;
+  Rect<int>              clippingRect;
+
+  application.SendNotification();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
+
+  // Change the layer to 3D
+  application.GetScene().GetRootLayer().SetProperty(Layer::Property::BEHAVIOR, Layer::LAYER_3D);
+
+  application.SendNotification();
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS<Rect<int>>(TestApplication::DEFAULT_SURFACE_RECT, damagedRects[0], TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  drawTrace.Reset();
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
+
+  // Change the layer to 2D
+  application.GetScene().GetRootLayer().SetProperty(Layer::Property::BEHAVIOR, Layer::LAYER_UI);
+
+  application.SendNotification();
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Make 3D transform
+  actor1.SetProperty(Actor::Property::ORIENTATION, Quaternion(Degree(90.0f), Vector3::YAXIS));
+
+  application.SendNotification();
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS<Rect<int>>(TestApplication::DEFAULT_SURFACE_RECT, damagedRects[0], TEST_LOCATION);
+
+  clippingRect = TestApplication::DEFAULT_SURFACE_RECT;
+  drawTrace.Reset();
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  DALI_TEST_EQUALS(drawTrace.CountMethod("DrawElements"), 1, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int utcDaliActorPartialUpdateNotRenderableActor(void)
+{
+  TestApplication application(
+    TestApplication::DEFAULT_SURFACE_WIDTH,
+    TestApplication::DEFAULT_SURFACE_HEIGHT,
+    TestApplication::DEFAULT_HORIZONTAL_DPI,
+    TestApplication::DEFAULT_VERTICAL_DPI,
+    true,
+    true);
+
+  tet_infoline("Check the damaged rect with not renderable parent actor");
+
+  const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams());
+
+  Actor parent                          = Actor::New();
+  parent[Actor::Property::ANCHOR_POINT] = AnchorPoint::TOP_LEFT;
+  parent[Actor::Property::POSITION]     = Vector3(16.0f, 16.0f, 0.0f);
+  parent[Actor::Property::SIZE]         = Vector3(16.0f, 16.0f, 0.0f);
+  parent.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+  application.GetScene().Add(parent);
+
+  Actor child                          = CreateRenderableActor();
+  child[Actor::Property::ANCHOR_POINT] = AnchorPoint::TOP_LEFT;
+  child[Actor::Property::SIZE]         = Vector3(16.0f, 16.0f, 0.0f);
+  child.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+  parent.Add(child);
+
+  application.SendNotification();
+
+  std::vector<Rect<int>> damagedRects;
+
+  // 1. Actor added, damaged rect is added size of actor
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+
+  // Aligned by 16
+  Rect<int> clippingRect = Rect<int>(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Ensure the damaged rect is empty
+  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  END_TEST;
+}
+
+int utcDaliActorPartialUpdateChangeTransparency(void)
+{
+  TestApplication application(
+    TestApplication::DEFAULT_SURFACE_WIDTH,
+    TestApplication::DEFAULT_SURFACE_HEIGHT,
+    TestApplication::DEFAULT_HORIZONTAL_DPI,
+    TestApplication::DEFAULT_VERTICAL_DPI,
+    true,
+    true);
+
+  tet_infoline("Check the damaged rect with changing transparency");
+
+  const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams());
+
+  Actor actor                          = CreateRenderableActor();
+  actor[Actor::Property::ANCHOR_POINT] = AnchorPoint::TOP_LEFT;
+  actor[Actor::Property::POSITION]     = Vector3(16.0f, 16.0f, 0.0f);
+  actor[Actor::Property::SIZE]         = Vector3(16.0f, 16.0f, 0.0f);
+  actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+  application.GetScene().Add(actor);
+
+  application.SendNotification();
+
+  std::vector<Rect<int>> damagedRects;
+
+  // Actor added, damaged rect is added size of actor
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+
+  // Aligned by 16
+  Rect<int> clippingRect = Rect<int>(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Make the actor transparent by changing opacity of the Renderer
+  // It changes a uniform value
+  Renderer renderer                          = actor.GetRendererAt(0);
+  renderer[DevelRenderer::Property::OPACITY] = 0.0f;
+
+  application.SendNotification();
+
+  // The damaged rect should be same
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_CHECK(damagedRects.size() > 0);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Ensure the damaged rect is empty
+  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  // Make the actor opaque again
+  renderer[DevelRenderer::Property::OPACITY] = 1.0f;
+
+  application.SendNotification();
+
+  // The damaged rect should not be empty
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Make the actor culled
+  actor[Actor::Property::SIZE] = Vector3(0.0f, 0.0f, 0.0f);
+
+  application.SendNotification();
+
+  // The damaged rect should be same
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_CHECK(damagedRects.size() > 0);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Ensure the damaged rect is empty
+  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  // Make the actor not culled again
+  actor[Actor::Property::SIZE] = Vector3(16.0f, 16.0f, 16.0f);
+
+  application.SendNotification();
+
+  // The damaged rect should not be empty
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  END_TEST;
+}
+
+int utcDaliActorPartialUpdateChangeParentOpacity(void)
+{
+  TestApplication application(
+    TestApplication::DEFAULT_SURFACE_WIDTH,
+    TestApplication::DEFAULT_SURFACE_HEIGHT,
+    TestApplication::DEFAULT_HORIZONTAL_DPI,
+    TestApplication::DEFAULT_VERTICAL_DPI,
+    true,
+    true);
+
+  tet_infoline("Check the damaged rect with changing parent's opacity");
+
+  const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams());
+
+  Actor parent                          = Actor::New();
+  parent[Actor::Property::ANCHOR_POINT] = AnchorPoint::TOP_LEFT;
+  parent[Actor::Property::POSITION]     = Vector3(16.0f, 16.0f, 0.0f);
+  parent[Actor::Property::SIZE]         = Vector3(16.0f, 16.0f, 0.0f);
+  parent.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+  application.GetScene().Add(parent);
+
+  Texture texture                      = CreateTexture(TextureType::TEXTURE_2D, Pixel::RGBA8888, 16u, 16u);
+  Actor   child                        = CreateRenderableActor(texture);
+  child[Actor::Property::ANCHOR_POINT] = AnchorPoint::TOP_LEFT;
+  child[Actor::Property::SIZE]         = Vector3(16.0f, 16.0f, 0.0f);
+  child.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+  parent.Add(child);
+
+  application.SendNotification();
+
+  std::vector<Rect<int>> damagedRects;
+
+  // Actor added, damaged rect is added size of actor
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+
+  // Aligned by 16
+  Rect<int> clippingRect = Rect<int>(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Ensure the damaged rect is empty
+  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  // Change the parent's opacity
+  parent[Actor::Property::OPACITY] = 0.5f;
+
+  application.SendNotification();
+
+  // The damaged rect should be same
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_CHECK(damagedRects.size() > 0);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  END_TEST;
+}
+
+int utcDaliActorPartialAddRemoveRenderer(void)
+{
+  TestApplication application(
+    TestApplication::DEFAULT_SURFACE_WIDTH,
+    TestApplication::DEFAULT_SURFACE_HEIGHT,
+    TestApplication::DEFAULT_HORIZONTAL_DPI,
+    TestApplication::DEFAULT_VERTICAL_DPI,
+    true,
+    true);
+
+  tet_infoline("Check the damaged rect with adding / removing renderer");
+
+  const TestGlAbstraction::ScissorParams& glScissorParams(application.GetGlAbstraction().GetScissorParams());
+
+  Actor actor                          = CreateRenderableActor();
+  actor[Actor::Property::ANCHOR_POINT] = AnchorPoint::TOP_LEFT;
+  actor[Actor::Property::POSITION]     = Vector3(16.0f, 16.0f, 0.0f);
+  actor[Actor::Property::SIZE]         = Vector3(16.0f, 16.0f, 0.0f);
+  actor.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
+  application.GetScene().Add(actor);
+
+  application.SendNotification();
+
+  std::vector<Rect<int>> damagedRects;
+
+  // Actor added, damaged rect is added size of actor
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+
+  // Aligned by 16
+  Rect<int> clippingRect = Rect<int>(16, 768, 32, 32); // in screen coordinates, includes 3 last frames updates
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(clippingRect.x, glScissorParams.x, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.y, glScissorParams.y, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.width, glScissorParams.width, TEST_LOCATION);
+  DALI_TEST_EQUALS(clippingRect.height, glScissorParams.height, TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Remove the Renderer
+  Renderer renderer = actor.GetRendererAt(0);
+  actor.RemoveRenderer(renderer);
+
+  application.SendNotification();
+
+  // The damaged rect should be the actor area
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_CHECK(damagedRects.size() > 0);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+
+  // Ensure the damaged rect is empty
+  DALI_TEST_EQUALS(damagedRects.size(), 0, TEST_LOCATION);
+
+  // Add the Renderer again
+  actor.AddRenderer(renderer);
+
+  application.SendNotification();
+
+  // The damaged rect should be the actor area
+  damagedRects.clear();
+  application.PreRenderWithPartialUpdate(TestApplication::RENDER_FRAME_INTERVAL, nullptr, damagedRects);
+  application.RenderWithPartialUpdate(damagedRects, clippingRect);
+  DALI_TEST_EQUALS(damagedRects.size(), 1, TEST_LOCATION);
+  DALI_TEST_EQUALS<Rect<int>>(clippingRect, damagedRects[0], TEST_LOCATION);
+
+  END_TEST;
+}
+
+int UtcDaliActorCaptureAllTouchAfterStartPropertyP(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  DALI_TEST_EQUALS(actor.GetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START).Get<bool>(), false, TEST_LOCATION);
+  actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, true);
+  DALI_TEST_EQUALS(actor.GetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START).Get<bool>(), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(actor.GetPropertyType(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), Property::BOOLEAN, TEST_LOCATION);
+  DALI_TEST_EQUALS(actor.IsPropertyWritable(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(actor.IsPropertyAnimatable(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), false, TEST_LOCATION);
+  DALI_TEST_EQUALS(actor.IsPropertyAConstraintInput(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), false, TEST_LOCATION);
+  DALI_TEST_EQUALS(actor.GetPropertyName(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START), "captureAllTouchAfterStart", TEST_LOCATION);
+  END_TEST;
+}
+
+int UtcDaliActorCaptureAllTouchAfterStartPropertyN(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  // Make sure setting invalid types does not cause a crash
+  try
+  {
+    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, 1.0f);
+    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector2::ONE);
+    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector3::ONE);
+    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Vector4::ONE);
+    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Property::Map());
+    actor.SetProperty(DevelActor::Property::CAPTURE_ALL_TOUCH_AFTER_START, Property::Array());
+    tet_result(TET_PASS);
+  }
+  catch(...)
+  {
+    tet_result(TET_FAIL);
+  }
+  END_TEST;
+}
+
+int UtcDaliActorTouchAreaOffsetPropertyP(void)
+{
+  TestApplication application;
+
+  Actor     actor           = Actor::New();
+  Rect<int> touchAreaOffset = actor.GetProperty(DevelActor::Property::TOUCH_AREA_OFFSET).Get<Rect<int>>();
+  DALI_TEST_EQUALS(Rect<int>(0, 0, 0, 0), touchAreaOffset, TEST_LOCATION);
+  actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Rect<int>(10, 20, 30, 40));
+  touchAreaOffset = actor.GetProperty(DevelActor::Property::TOUCH_AREA_OFFSET).Get<Rect<int>>();
+  DALI_TEST_EQUALS(Rect<int>(10, 20, 30, 40), touchAreaOffset, TEST_LOCATION);
+  END_TEST;
+}
+
+int UtcDaliActorTouchAreaOffsetPropertyN(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+
+  // Make sure setting invalid types does not cause a crash
+  try
+  {
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, 1.0f);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Vector2::ONE);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Vector3::ONE);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Vector4::ONE);
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Property::Map());
+    actor.SetProperty(DevelActor::Property::TOUCH_AREA_OFFSET, Property::Array());
+    tet_result(TET_PASS);
+  }
+  catch(...)
   {
     tet_result(TET_FAIL);
   }
@@ -9496,3 +10310,108 @@ int UtcDaliActorRegisterProperty(void)
 
   END_TEST;
 }
+
+int UtcDaliActorDoesWantedHitTest(void)
+{
+  struct HitTestData
+  {
+  public:
+    HitTestData(const Vector3& scale, const Vector2& touchPoint, bool result)
+    : mScale(scale),
+      mTouchPoint(touchPoint),
+      mResult(result)
+    {
+    }
+
+    Vector3 mScale;
+    Vector2 mTouchPoint;
+    bool    mResult;
+  };
+
+  TestApplication application;
+  tet_infoline(" UtcDaliActorDoesWantedHitTest");
+
+  // Fill a vector with different hit tests.
+  struct HitTestData* hitTestData[] = {
+    //                    scale                     touch point           result
+    new HitTestData(Vector3(100.f, 100.f, 1.f), Vector2(289.f, 400.f), true),  // touch point close to the right edge (inside)
+    new HitTestData(Vector3(100.f, 100.f, 1.f), Vector2(291.f, 400.f), false), // touch point close to the right edge (outside)
+    new HitTestData(Vector3(110.f, 100.f, 1.f), Vector2(291.f, 400.f), true),  // same point as above with a wider scale. Should be inside.
+    new HitTestData(Vector3(100.f, 100.f, 1.f), Vector2(200.f, 451.f), false), // touch point close to the down edge (outside)
+    new HitTestData(Vector3(100.f, 110.f, 1.f), Vector2(200.f, 451.f), true),  // same point as above with a wider scale. Should be inside.
+    NULL,
+  };
+
+  // get the root layer
+  Actor actor = Actor::New();
+  actor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
+  actor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
+
+  Actor lowerActor = Actor::New();
+  lowerActor.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
+  lowerActor.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
+
+  // actor and lowerActor have no relationship.
+  application.GetScene().Add(lowerActor);
+  application.GetScene().Add(actor);
+
+  ResetTouchCallbacks();
+  gHitTestTouchCallBackCalled = false;
+
+  unsigned int index = 0;
+  while(NULL != hitTestData[index])
+  {
+    actor.SetProperty(Actor::Property::SIZE, Vector2(1.f, 1.f));
+    actor.SetProperty(Actor::Property::SCALE, Vector3(hitTestData[index]->mScale.x, hitTestData[index]->mScale.y, hitTestData[index]->mScale.z));
+
+    lowerActor.SetProperty(Actor::Property::SIZE, Vector2(1.f, 1.f));
+    lowerActor.SetProperty(Actor::Property::SCALE, Vector3(hitTestData[index]->mScale.x, hitTestData[index]->mScale.y, hitTestData[index]->mScale.z));
+
+    // flush the queue and render once
+    application.SendNotification();
+    application.Render();
+
+    DALI_TEST_CHECK(!gTouchCallBackCalled);
+    DALI_TEST_CHECK(!gTouchCallBackCalled2);
+    DALI_TEST_CHECK(!gHitTestTouchCallBackCalled);
+
+    // connect to its touch signal
+    actor.TouchedSignal().Connect(TestTouchCallback);
+    lowerActor.TouchedSignal().Connect(TestTouchCallback2);
+
+    // connect to its hit-test signal
+    Dali::DevelActor::HitTestResultSignal(actor).Connect(TestHitTestTouchCallback);
+
+    Dali::Integration::Point point;
+    point.SetState(PointState::DOWN);
+    point.SetScreenPosition(Vector2(hitTestData[index]->mTouchPoint.x, hitTestData[index]->mTouchPoint.y));
+    Dali::Integration::TouchEvent event;
+    event.AddPoint(point);
+
+    // flush the queue and render once
+    application.SendNotification();
+    application.Render();
+    application.ProcessEvent(event);
+
+    // check hit-test events
+    DALI_TEST_CHECK(gHitTestTouchCallBackCalled == hitTestData[index]->mResult);
+    // Passed all hit-tests of actor.
+    DALI_TEST_CHECK(gTouchCallBackCalled == false);
+    // The lowerActor was hit-tested.
+    DALI_TEST_CHECK(gTouchCallBackCalled2 == hitTestData[index]->mResult);
+
+    if(gTouchCallBackCalled2 != hitTestData[index]->mResult)
+      tet_printf("Test failed:\nScale %f %f %f\nTouchPoint %f, %f\nResult %d\n",
+                 hitTestData[index]->mScale.x,
+                 hitTestData[index]->mScale.y,
+                 hitTestData[index]->mScale.z,
+                 hitTestData[index]->mTouchPoint.x,
+                 hitTestData[index]->mTouchPoint.y,
+                 hitTestData[index]->mResult);
+
+    ResetTouchCallbacks();
+    gHitTestTouchCallBackCalled = false;
+    ++index;
+  }
+  END_TEST;
+}