[dali_1.1.21] Merge branch 'devel/master' 13/59313/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 12 Feb 2016 10:32:47 +0000 (10:32 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 12 Feb 2016 10:32:47 +0000 (10:32 +0000)
Change-Id: I00e8d224899dc3d81c9810d7b27723e493214873

83 files changed:
automated-tests/README.md
automated-tests/build.sh
automated-tests/execute.sh
automated-tests/scripts/output_summary.pl [new file with mode: 0755]
automated-tests/scripts/summarize.pl
automated-tests/src/dali-devel/tct-dali-devel-core.cpp
automated-tests/src/dali-devel/utc-Dali-Context.cpp
automated-tests/src/dali-devel/utc-Dali-Material.cpp
automated-tests/src/dali-devel/utc-Dali-Renderer.cpp
automated-tests/src/dali-internal/tct-dali-internal-core.cpp
automated-tests/src/dali/dali-test-suite-utils/test-gl-abstraction.cpp
automated-tests/src/dali/dali-test-suite-utils/test-harness.cpp
automated-tests/src/dali/dali-test-suite-utils/test-harness.h
automated-tests/src/dali/tct-dali-core.cpp
automated-tests/src/dali/utc-Dali-Animation.cpp
dali/devel-api/rendering/material.cpp
dali/devel-api/rendering/material.h
dali/devel-api/rendering/renderer.cpp
dali/devel-api/rendering/renderer.h
dali/internal/common/blending-options.cpp
dali/internal/common/blending-options.h
dali/internal/common/type-abstraction-enums.h
dali/internal/event/actors/image-actor-impl.cpp
dali/internal/event/animation/animation-impl.cpp
dali/internal/event/animation/animation-impl.h
dali/internal/event/common/object-impl-helper.h
dali/internal/event/rendering/material-impl.cpp
dali/internal/event/rendering/material-impl.h
dali/internal/event/rendering/renderer-impl.cpp
dali/internal/event/rendering/renderer-impl.h
dali/internal/render/data-providers/material-data-provider.h [deleted file]
dali/internal/render/data-providers/render-data-provider.cpp
dali/internal/render/data-providers/render-data-provider.h
dali/internal/render/gl-resources/context.cpp
dali/internal/render/gl-resources/context.h
dali/internal/render/renderers/render-renderer.cpp
dali/internal/render/renderers/render-renderer.h
dali/internal/update/manager/prepare-render-instructions.h
dali/internal/update/rendering/scene-graph-material.cpp
dali/internal/update/rendering/scene-graph-material.h
dali/internal/update/rendering/scene-graph-renderer.cpp
dali/internal/update/rendering/scene-graph-renderer.h
dali/public-api/actors/actor-enumerations.h
dali/public-api/actors/actor.h
dali/public-api/actors/blending.h
dali/public-api/actors/camera-actor.h
dali/public-api/actors/custom-actor-impl.h
dali/public-api/actors/custom-actor.h
dali/public-api/actors/image-actor.h
dali/public-api/actors/layer.h
dali/public-api/actors/sampling.h
dali/public-api/animation/alpha-function.h
dali/public-api/animation/animation.cpp
dali/public-api/animation/animation.h
dali/public-api/animation/constraint-source.h
dali/public-api/animation/constraint.h
dali/public-api/animation/constraints.h
dali/public-api/animation/key-frames.h
dali/public-api/animation/linear-constrainer.h
dali/public-api/animation/path.h
dali/public-api/common/dali-common.h
dali/public-api/common/dali-vector.h
dali/public-api/common/intrusive-ptr.h
dali/public-api/common/stage.h
dali/public-api/common/type-traits.h
dali/public-api/dali-core-version.cpp
dali/public-api/events/gesture-detector.h
dali/public-api/events/gesture.h
dali/public-api/events/key-event.h
dali/public-api/events/long-press-gesture-detector.h
dali/public-api/events/long-press-gesture.h
dali/public-api/events/pan-gesture-detector.h
dali/public-api/events/pan-gesture.h
dali/public-api/events/pinch-gesture-detector.h
dali/public-api/events/pinch-gesture.h
dali/public-api/events/tap-gesture-detector.h
dali/public-api/events/tap-gesture.h
dali/public-api/events/touch-event.h
dali/public-api/events/wheel-event.h
dali/public-api/object/base-handle.h
dali/public-api/object/handle.h
dali/public-api/object/property-notification.h
packaging/dali.spec

index 65876e8..8beb8b0 100644 (file)
@@ -80,29 +80,34 @@ Or without cleaning down the build area (Useful for fast build/run/debug cycles)
 Executing the tests
 -------------------
 
+To see a list of all of the options:
+
+    ./execute.sh -h
+
 To execute tests, cd into automated-tests and run
 
     ./execute.sh
 
 This will execute dali and dali-internal test sets. Note that the output summary for the first will be printed before running the second.
 
-By default the tests execute in parallel, which is faster but does not produce any test case output files.  Use this to execute the tests in series:
+By default the tests execute in parallel, which is faster but does not produce any test case output files.  Use this to execute the tests in series and log test output to stdout/err
 
-    ./execute.sh -s
+    ./execute.sh -S
 
-To see the results, copy the style folder from web-tct_2.2.1_r1/tools/tct-mgr/style into automated-tests and run
+To use test kit lite, (which is very slow),
 
-    firefox --new-window summary.xml
+    ./execute.sh -s
 
-To see a list of all of the options:
+To see the test kit lite results, copy the style folder from web-tct_2.2.1_r1/tools/tct-mgr/style into automated-tests and run
 
-    ./execute.sh -h
+    firefox --new-window summary.xml
 
 To execute a subset of tests, you can run individual test sets, e.g.
 
     ./execute.sh dali
 
-To get coverage output, run
+To get coverage output (you need to first build dali libraries with
+--coverage), run
 
     ./coverage.sh
 
@@ -193,10 +198,10 @@ On desktop, you can debug the tests by running gdb on the test program:
 
 replace `<TestCase>` with the name of the failing testcase.
 
-For example, using testcase UtcDaliNinePatch01 from the dali-core test suite:
+For example, using testcase UtcDaliActorAddP from the dali-core test suite:
 
     $ gdb build/src/dali/tct-dali-core
-    gdb> r UtcDaliNinePatch01
+    gdb> r UtcDaliActorAddP
 
 
 On target, you can re-install the test RPM and associated debug RPMs manually using
index 7c7584b..2f92135 100755 (executable)
@@ -48,3 +48,6 @@ else
     fi
   done
 fi
+
+echo "Build succeeded"
+exit 0
index 04dbd1f..7d430c9 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-TEMP=`getopt -o hsr --long help,serial,rerun -n 'execute.sh' -- "$@"`
+TEMP=`getopt -o hsSm --long help,serial,tct,modules -n 'execute.sh' -- "$@"`
 
 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
 
@@ -9,34 +9,63 @@ eval set -- "$TEMP"
 
 function usage
 {
-    echo -e "Usage: execute.sh\t\tExecute test cases from all modules in parallel"
-    echo -e "       execute.sh <testmodule>\tExecute test cases from the given module in parallel"
-    echo -e "       execute.sh -s\t\tExecute test cases in serial using Testkit-Lite"
-    echo -e "       execute.sh -r\t\tExecute test cases in parallel, re-running failed test cases in serial afterwards"
+    echo -e "Usage: execute.sh [-s|-S|-r] [module|testcase]"
+    echo -e "       execute.sh\t\tExecute test cases from all modules in parallel"
+    echo -e "       execute.sh [module]\tExecute test cases from the given module in parallel"
+    echo -e "       execute.sh -s [module]\t\tExecute test cases in serial using Testkit-Lite"
+    echo -e "       execute.sh -S [module]\t\tExecute test cases in serial"
     echo -e "       execute.sh <testcase>\tFind and execute the given test case"
     exit 2
 }
 
-opt_serial=0
-opt_rerun=""
+opt_tct=0
+opt_serial=""
+opt_modules=0
 while true ; do
     case "$1" in
         -h|--help)     usage ;;
-        -s|--serial)   opt_serial=1 ; shift ;;
-        -r|--rerun)    opt_rerun="-r" ; shift ;;
+        -s|--tct)      opt_tct=1 ; shift ;;
+        -S|--serial)   opt_serial="-s" ; shift ;;
+        -m|--modules)  opt_modules=1 ; shift ;;
         --) shift; break;;
         *) echo "Internal error $1!" ; exit 1 ;;
     esac
 done
 
-function execute
+function execute_tct
 {
     scripts/tctestsgen.sh $1 `pwd` desktop $2
     testkit-lite -f `pwd`/tests.xml -o tct-${1}-core-tests.xml  -A --comm localhost
     scripts/add_style.pl $1
 }
 
+function summary_start
+{
+    start=`date +"%Y-%m-%d_%H_%M_%S"`
+    cat > summary.xml <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="./style/summary.xsl"?>
+<result_summary plan_name="Core">
+  <other xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string" />
+  <summary test_plan_name="Dali">
+    <start_at>$start</start_at>
+    <end_at>$start</end_at>
+  </summary>
+EOF
+}
+
+function summary_end
+{
+    cat >> summary.xml <<EOF
+</result_summary>
+EOF
+}
 
+if [ $opt_modules == 1 ] ; then
+    modules= get_modules
+    echo $modules
+    exit 0
+fi
 
 # Clean up old test results
 rm -f tct*core-tests.xml
@@ -51,47 +80,56 @@ find build \( -name "*.gcda" \) -exec rm '{}' \;
 ASCII_BOLD="\e[1m"
 ASCII_RESET="\e[0m"
 
-if [ $opt_serial = 1 ] ; then
+modules=`ls -1 src/ | grep -v CMakeList | grep -v common | grep -v manual`
+if [ -f summary.xml ] ; then unlink summary.xml ; fi
+
+if [ $opt_tct == 1 ] ; then
+    # Use Test-kit lite
     # Run all test case executables serially, create XML output
     if [ -n "$1" ] ; then
-        execute $1 $*
+        execute_tct $1 $*
     else
-        for mod in `ls -1 src/ | grep -v CMakeList `
+        for mod in $modules
         do
             if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
 
                 echo -ne "$ASCII_BOLD"
                 echo -e "Executing $mod$ASCII_RESET"
-                execute $mod $*
+                execute_tct $mod $*
             fi
         done
     fi
 
     scripts/summarize.pl
+
 else
-    # if $1 is an executable filename, execute it·
+    # Execute test cases using own test harness
 
     if [ -z "$1" ] ; then
         # No arguments:
-        # Execute each test executable in turn, using parallel execution
-        for mod in `ls -1 src/ | grep -v CMakeList | grep -v common | grep -v manual`
+        # Execute each test executable in turn (by default, runs tests in parallel)
+        summary_start
+        for mod in $modules
         do
             echo -e "$ASCII_BOLD"
             echo -e "Executing $mod$ASCII_RESET"
-            build/src/$mod/tct-$mod-core $opt_rerun
+            build/src/$mod/tct-$mod-core -r $opt_serial
         done
+        summary_end
 
     elif [ -f "build/src/$1/tct-$1-core" ] ; then
         # First argument is an executable filename - execute only that with any
         # remaining arguments
+        summary_start
         module=$1
         shift;
-        build/src/$module/tct-$module-core $opt_rerun $*
+        build/src/$module/tct-$module-core -r $opt_serial $*
+        summary_end
 
     else
        # First argument is not an executable. Is it a test case name?
        # Try executing each executable with the test case name until success/known failure
-        for mod in `ls -1 src/ | grep -v CMakeList | grep -v common | grep -v manual`
+        for mod in $modules
         do
             output=`build/src/$mod/tct-$mod-core $1`
             ret=$?
@@ -104,3 +142,9 @@ else
         echo $1 not found
     fi
 fi
+
+if [ -f summary.xml ] ; then
+    scripts/output_summary.pl
+fi
+
+exit $?
diff --git a/automated-tests/scripts/output_summary.pl b/automated-tests/scripts/output_summary.pl
new file mode 100755 (executable)
index 0000000..dec392d
--- /dev/null
@@ -0,0 +1,78 @@
+#!/usr/bin/perl
+
+# Reads summary.xml and produces human readable output
+
+use strict;
+use XML::Parser;
+use Encode;
+use Getopt::Long;
+use Cwd;
+
+my $pwd = getcwd;
+my $text = "";
+my $module="";
+my %modules=();
+
+sub handle_start
+{
+    my ($p, $elt, %attrs) = @_;
+
+    if($elt =~ /suite/)
+    {
+        $module=$attrs{"name"};
+    }
+    if($elt =~ /_case/)
+    {
+        $text = "";
+    }
+}
+
+sub handle_end
+{
+  my ($p, $elt) = @_;
+  if($elt =~ /pass_case/)
+  {
+      $modules{$module}->{"pass"}=$text;
+      $text="";
+  }
+  elsif($elt =~ /fail_case/)
+  {
+      $modules{$module}->{"fail"}=$text;
+      $text="";
+  }
+}
+
+sub handle_char
+{
+  my ($p, $str) = @_;
+  $text .= $str;
+}
+
+my($parser) = new XML::Parser(Handlers => {Start => \&handle_start,
+                                           End   => \&handle_end,
+                                           Char  => \&handle_char});
+$parser->parsefile("summary.xml");
+
+my $RED_COLOR="\e[1;31m";
+my $GREEN_COLOR="\e[1;32m";
+my $ASCII_RESET="\e[0m";
+my $ASCII_BOLD="\e[1m";
+
+print "\n";
+my $totalFailures=0;
+foreach $module (keys(%modules))
+{
+    my $result_colour = $GREEN_COLOR;
+    if( $modules{$module}->{"fail"} )
+    {
+        $result_colour = $RED_COLOR;
+    }
+    my $numPasses = $modules{$module}->{"pass"};
+    my $numFailures = $modules{$module}->{"fail"};
+    $totalFailures += $numFailures;
+    print( "$ASCII_BOLD$module results:$ASCII_RESET\n" );
+    printf("Number of test passes:   %s%4d (%5.2f%%)%s\n", $ASCII_BOLD, $numPasses, 100.0 * $numPasses / ($numPasses+$numFailures),  $ASCII_RESET);
+    printf("%sNumber of test failures:%s %s%4d%s\n\n", $result_colour, $ASCII_RESET, $ASCII_BOLD, $numFailures, $ASCII_RESET);
+}
+
+exit $totalFailures == 0;
index c90eb89..8270376 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/perl
 
+# Generates an XML summary of test cases from Test-kit lite output XML.
+
 use strict;
 use XML::Parser;
 use Encode;
index 69d3233..4553f75 100644 (file)
@@ -8,8 +8,9 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "r";
-  bool optRerunFailed(false);
+  const char* optString = "rs";
+  bool optRerunFailed(true);
+  bool optRunSerially(false);
 
   int nextOpt = 0;
   do
@@ -20,6 +21,9 @@ int main(int argc, char * const argv[])
       case 'r':
         optRerunFailed = true;
         break;
+      case 's':
+        optRunSerially = true;
+        break;
       case '?':
         TestHarness::Usage(argv[0]);
         exit(TestHarness::EXIT_STATUS_BAD_ARGUMENT);
@@ -29,7 +33,14 @@ int main(int argc, char * const argv[])
 
   if( optind == argc ) // no testcase name in argument list
   {
-    result = TestHarness::RunAllInParallel(argv[0], tc_array, optRerunFailed);
+    if( optRunSerially )
+    {
+      result = TestHarness::RunAll( argv[0], tc_array );
+    }
+    else
+    {
+      result = TestHarness::RunAllInParallel( argv[0], tc_array, optRerunFailed );
+    }
   }
   else
   {
index 09cdcd9..e3adc4b 100644 (file)
@@ -27,7 +27,7 @@ using namespace Dali;
 namespace
 {
 // Size of the VertexAttributeArray enables
-// GLES specification states that there's minimum of
+// GLES specification states that there's a minimum of 8
 const unsigned int TEST_MAX_ATTRIBUTE_CACHE_SIZE = 8;
 
 enum TestAttribType
index ceb2b51..4ec8459 100644 (file)
@@ -225,648 +225,6 @@ int UtcDaliMaterialGetNumberOfTextures(void)
   END_TEST;
 }
 
-int UtcDaliMaterialSetFaceCullingMode(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test SetFaceCullingMode(cullingMode)");
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  TestGlAbstraction& gl = application.GetGlAbstraction();
-  TraceCallStack& cullFaceStack = gl.GetCullFaceTrace();
-  gl.EnableCullFaceCallTrace(true);
-
-  {
-    cullFaceStack.Reset();
-    material.SetFaceCullingMode( Material::CULL_BACK_AND_FRONT );
-    application.SendNotification();
-    application.Render();
-
-    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 1, TEST_LOCATION );
-
-    std::ostringstream cullModeString;
-    cullModeString << GL_FRONT_AND_BACK;
-
-    DALI_TEST_CHECK( cullFaceStack.FindMethodAndParams( "CullFace", cullModeString.str() ) );
-  }
-
-  {
-    cullFaceStack.Reset();
-    material.SetFaceCullingMode( Material::CULL_BACK );
-    application.SendNotification();
-    application.Render();
-
-    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 1, TEST_LOCATION );
-
-    std::ostringstream cullModeString;
-    cullModeString << GL_BACK;
-
-    DALI_TEST_CHECK( cullFaceStack.FindMethodAndParams( "CullFace", cullModeString.str() ) );
-  }
-
-  {
-    cullFaceStack.Reset();
-    material.SetFaceCullingMode( Material::CULL_FRONT );
-    application.SendNotification();
-    application.Render();
-
-    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 1, TEST_LOCATION );
-
-    std::ostringstream cullModeString;
-    cullModeString << GL_FRONT;
-
-    DALI_TEST_CHECK( cullFaceStack.FindMethodAndParams( "CullFace", cullModeString.str() ) );
-  }
-
-  {
-    cullFaceStack.Reset();
-    material.SetFaceCullingMode( Material::NONE );
-    application.SendNotification();
-    application.Render();
-
-    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 0, TEST_LOCATION );
-  }
-
-  END_TEST;
-}
-
-int UtcDaliMaterialBlendingOptions01(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test SetBlendFunc(src, dest) ");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  // set a transparent actor color so that blending is enabled
-  actor.SetOpacity( 0.5f );
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendFunc(BlendingFactor::ONE_MINUS_SRC_COLOR, BlendingFactor::SRC_ALPHA_SATURATE);
-
-  // Test that Set was successful:
-  BlendingFactor::Type srcFactorRgb( BlendingFactor::ZERO );
-  BlendingFactor::Type destFactorRgb( BlendingFactor::ZERO );
-  BlendingFactor::Type srcFactorAlpha( BlendingFactor::ZERO );
-  BlendingFactor::Type destFactorAlpha( BlendingFactor::ZERO );
-  material.GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-
-  DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_SRC_COLOR, srcFactorRgb,    TEST_LOCATION );
-  DALI_TEST_EQUALS( BlendingFactor::SRC_ALPHA_SATURATE,  destFactorRgb,   TEST_LOCATION );
-  DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_SRC_COLOR, srcFactorAlpha,  TEST_LOCATION );
-  DALI_TEST_EQUALS( BlendingFactor::SRC_ALPHA_SATURATE,  destFactorAlpha, TEST_LOCATION );
-
-  application.SendNotification();
-  application.Render();
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-
-  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_SRC_COLOR, glAbstraction.GetLastBlendFuncSrcRgb(),   TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_SRC_ALPHA_SATURATE,  glAbstraction.GetLastBlendFuncDstRgb(),   TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_SRC_COLOR, glAbstraction.GetLastBlendFuncSrcAlpha(), TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_SRC_ALPHA_SATURATE,  glAbstraction.GetLastBlendFuncDstAlpha(), TEST_LOCATION );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialBlendingOptions02(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test SetBlendFunc(srcRgb, destRgb, srcAlpha, destAlpha) ");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.SetOpacity( 0.5f ); // enable blending
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendFunc( BlendingFactor::CONSTANT_COLOR, BlendingFactor::ONE_MINUS_CONSTANT_COLOR,
-                         BlendingFactor::CONSTANT_ALPHA, BlendingFactor::ONE_MINUS_CONSTANT_ALPHA );
-
-  // Test that Set was successful:
-  {
-    BlendingFactor::Type srcFactorRgb( BlendingFactor::ZERO );
-    BlendingFactor::Type destFactorRgb( BlendingFactor::ZERO );
-    BlendingFactor::Type srcFactorAlpha( BlendingFactor::ZERO );
-    BlendingFactor::Type destFactorAlpha( BlendingFactor::ZERO );
-    material.GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-
-    DALI_TEST_EQUALS( BlendingFactor::CONSTANT_COLOR,            srcFactorRgb,    TEST_LOCATION );
-    DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_CONSTANT_COLOR,  destFactorRgb,   TEST_LOCATION );
-    DALI_TEST_EQUALS( BlendingFactor::CONSTANT_ALPHA,            srcFactorAlpha,  TEST_LOCATION );
-    DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_CONSTANT_ALPHA,  destFactorAlpha, TEST_LOCATION );
-  }
-
-  application.SendNotification();
-  application.Render();
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  DALI_TEST_EQUALS( (GLenum)GL_CONSTANT_COLOR,           glAbstraction.GetLastBlendFuncSrcRgb(),   TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_CONSTANT_COLOR, glAbstraction.GetLastBlendFuncDstRgb(),   TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_CONSTANT_ALPHA,           glAbstraction.GetLastBlendFuncSrcAlpha(), TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_CONSTANT_ALPHA, glAbstraction.GetLastBlendFuncDstAlpha(), TEST_LOCATION );
-
-  END_TEST;
-}
-
-
-
-int UtcDaliMaterialBlendingOptions03(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test GetBlendEquation() defaults ");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  // Test the defaults as documented in blending.h
-  BlendingEquation::Type equationRgb( BlendingEquation::SUBTRACT );
-  BlendingEquation::Type equationAlpha( BlendingEquation::SUBTRACT );
-  material.GetBlendEquation( equationRgb, equationAlpha );
-  DALI_TEST_EQUALS( BlendingEquation::ADD, equationRgb, TEST_LOCATION );
-  DALI_TEST_EQUALS( BlendingEquation::ADD, equationAlpha, TEST_LOCATION );
-
-  END_TEST;
-}
-
-
-int UtcDaliMaterialBlendingOptions04(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test SetBlendEquation() ");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.SetOpacity( 0.1f );
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  // Test the single blending equation setting
-  {
-    material.SetBlendEquation( BlendingEquation::REVERSE_SUBTRACT );
-    BlendingEquation::Type equationRgba( BlendingEquation::SUBTRACT );
-    material.GetBlendEquation( equationRgba, equationRgba );
-    DALI_TEST_EQUALS( BlendingEquation::REVERSE_SUBTRACT, equationRgba, TEST_LOCATION );
-  }
-
-  material.SetBlendEquation( BlendingEquation::REVERSE_SUBTRACT, BlendingEquation::REVERSE_SUBTRACT );
-
-  // Test that Set was successful
-  {
-    BlendingEquation::Type equationRgb( BlendingEquation::SUBTRACT );
-    BlendingEquation::Type equationAlpha( BlendingEquation::SUBTRACT );
-    material.GetBlendEquation( equationRgb, equationAlpha );
-    DALI_TEST_EQUALS( BlendingEquation::REVERSE_SUBTRACT, equationRgb, TEST_LOCATION );
-    DALI_TEST_EQUALS( BlendingEquation::REVERSE_SUBTRACT, equationAlpha, TEST_LOCATION );
-  }
-
-  // Render & check GL commands
-  application.SendNotification();
-  application.Render();
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  DALI_TEST_EQUALS( (GLenum)GL_FUNC_REVERSE_SUBTRACT, glAbstraction.GetLastBlendEquationRgb(),   TEST_LOCATION );
-  DALI_TEST_EQUALS( (GLenum)GL_FUNC_REVERSE_SUBTRACT, glAbstraction.GetLastBlendEquationAlpha(), TEST_LOCATION );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode01(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test setting the blend mode to on with an opaque color renders with blending enabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.SetOpacity( 0.98f );
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::ON);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-
-int UtcDaliMaterialSetBlendMode02(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test setting the blend mode to off with a transparent color renders with blending disabled (and not enabled)");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.SetOpacity( 0.15f );
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::OFF);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode03(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test setting the blend mode to auto with a transparent material color renders with blending enabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.SetOpacity( 0.75f );
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode04(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test setting the blend mode to auto with an opaque color renders with blending disabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode04b(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test setting the blend mode to auto with an opaque material color and a transparent actor color renders with blending enabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  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);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode04c(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test setting the blend mode to auto with an opaque material color and an opaque actor color renders with blending disabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Material material = CreateMaterial();
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  actor.SetColor( Color::MAGENTA );
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode05(void)
-{
-  TestApplication application;
-
-  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 );
-  Material material = CreateMaterial( image );
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendMode06(void)
-{
-  TestApplication application;
-  tet_infoline("Test setting the blend mode to auto with an opaque color and an image without an alpha channel and a shader with the hint OUTPUT_IS_TRANSPARENT renders with blending enabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_TRANSPARENT );
-  Material material = Material::New(shader);
-
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}
-
-
-//Todo: test the Shader::HINT_OUTPUT_IS_OPAQUE would disable the blending, the test cannot pass with current implementation
-/*int UtcDaliMaterialSetBlendMode07(void)
-{
-  TestApplication application;
-  tet_infoline("Test setting the blend mode to auto with a transparent color and an image without an alpha channel and a shader with the hint OUTPUT_IS_OPAQUE renders with blending disabled");
-  Geometry geometry = CreateQuadGeometry();
-  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
-  Material material = Material::New(shader);
-
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  std::ostringstream blendStr;
-  blendStr << GL_BLEND;
-  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
-
-  END_TEST;
-}*/
-
-int UtcDaliMaterialSetBlendMode08(void)
-{
-  TestApplication application;
-  tet_infoline("Test setting the blend mode to auto with an opaque color and an image without an alpha channel and a shader with the hint OUTPUT_IS_OPAQUE renders with blending disabled");
-
-  Geometry geometry = CreateQuadGeometry();
-  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
-  Material material = Material::New(shader);
-  BufferImage image = BufferImage::New( 50, 50, Pixel::RGB888 );
-  material.AddTexture( image, "sTexture" );
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  material.SetBlendMode(BlendingMode::AUTO);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-  glAbstraction.EnableEnableDisableCallTrace(true);
-
-  application.SendNotification();
-  application.Render();
-
-  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
-  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", "GL_BLEND" ) );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialGetBlendMode(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test GetBlendMode()");
-
-  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
-  Material material = Material::New(shader);
-
-  // default value
-  DALI_TEST_EQUALS( material.GetBlendMode(), BlendingMode::AUTO, TEST_LOCATION );
-
-  // ON
-  material.SetBlendMode(BlendingMode::ON);
-  DALI_TEST_EQUALS( material.GetBlendMode(), BlendingMode::ON, TEST_LOCATION );
-
-  // OFF
-  material.SetBlendMode(BlendingMode::OFF);
-  DALI_TEST_EQUALS( material.GetBlendMode(), BlendingMode::OFF, TEST_LOCATION );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialSetBlendColor(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test SetBlendColor(color)");
-
-  Geometry geometry = CreateQuadGeometry();
-  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
-  Material material = Material::New(shader);
-  BufferImage image = BufferImage::New( 50, 50, Pixel::RGBA8888 );
-  material.AddTexture( image, "sTexture" );
-  Renderer renderer = Renderer::New( geometry, material );
-
-  Actor actor = Actor::New();
-  actor.AddRenderer(renderer);
-  actor.SetSize(400, 400);
-  Stage::GetCurrent().Add(actor);
-
-  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
-
-  material.SetBlendColor( Color::TRANSPARENT );
-  application.SendNotification();
-  application.Render();
-  DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), Color::TRANSPARENT, TEST_LOCATION );
-
-  material.SetBlendColor( Color::MAGENTA );
-  application.SendNotification();
-  application.Render();
-  DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), Color::MAGENTA, TEST_LOCATION );
-
-  Vector4 color( 0.1f, 0.2f, 0.3f, 0.4f );
-  material.SetBlendColor( color );
-  application.SendNotification();
-  application.Render();
-  DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), color, TEST_LOCATION );
-
-  END_TEST;
-}
-
-int UtcDaliMaterialGetBlendColor(void)
-{
-  TestApplication application;
-
-  tet_infoline("Test GetBlendColor()");
-
-  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
-  Material material = Material::New(shader);
-
-  DALI_TEST_EQUALS( material.GetBlendColor(), Color::TRANSPARENT, TEST_LOCATION );
-
-  material.SetBlendColor( Color::MAGENTA );
-  application.SendNotification();
-  application.Render();
-  DALI_TEST_EQUALS( material.GetBlendColor(), Color::MAGENTA, TEST_LOCATION );
-
-  Vector4 color( 0.1f, 0.2f, 0.3f, 0.4f );
-  material.SetBlendColor( color );
-  application.SendNotification();
-  application.Render();
-  DALI_TEST_EQUALS( material.GetBlendColor(), color, TEST_LOCATION );
-
-  END_TEST;
-}
-
 int UtcDaliMaterialConstraint(void)
 {
   TestApplication application;
index 75fe780..938353b 100644 (file)
@@ -222,26 +222,709 @@ int UtcDaliRendererSetGetDepthIndex(void)
 
   application.SendNotification();
   application.Render(0);
-  DALI_TEST_EQUALS( renderer.GetDepthIndex(), 0, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 0, TEST_LOCATION );
 
-  renderer.SetDepthIndex(1);
+  renderer.SetProperty( Renderer::Property::DEPTH_INDEX, 1 );
 
   application.SendNotification();
   application.Render(0);
-  DALI_TEST_EQUALS( renderer.GetDepthIndex(), 1, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 1, TEST_LOCATION );
 
-  renderer.SetDepthIndex(10);
+  renderer.SetProperty( Renderer::Property::DEPTH_INDEX, 10 );
 
   application.SendNotification();
   application.Render(0);
-  DALI_TEST_EQUALS( renderer.GetDepthIndex(), 10, TEST_LOCATION );
   DALI_TEST_EQUALS( renderer.GetProperty<int>(Renderer::Property::DEPTH_INDEX), 10, TEST_LOCATION );
 
   END_TEST;
 }
 
+int UtcDaliRendererSetGetFaceCullingMode(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test SetFaceCullingMode(cullingMode)");
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  // By default, none of the faces should be culled
+  unsigned int cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
+  DALI_TEST_CHECK( static_cast< Dali::Renderer::FaceCullingMode >( cullFace ) == Renderer::NONE );
+
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  TraceCallStack& cullFaceStack = gl.GetCullFaceTrace();
+  gl.EnableCullFaceCallTrace(true);
+
+  {
+    cullFaceStack.Reset();
+    renderer.SetProperty( Renderer::Property::FACE_CULLING_MODE, Renderer::CULL_BACK_AND_FRONT );
+    application.SendNotification();
+    application.Render();
+
+    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 1, TEST_LOCATION );
+
+    std::ostringstream cullModeString;
+    cullModeString << GL_FRONT_AND_BACK;
+
+    DALI_TEST_CHECK( cullFaceStack.FindMethodAndParams( "CullFace", cullModeString.str() ) );
+    cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
+    DALI_TEST_CHECK( static_cast< Dali::Renderer::FaceCullingMode >( cullFace ) == Renderer::CULL_BACK_AND_FRONT);
+  }
+
+  {
+    cullFaceStack.Reset();
+    renderer.SetProperty( Renderer::Property::FACE_CULLING_MODE, Renderer::CULL_BACK );
+    application.SendNotification();
+    application.Render();
+
+    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 1, TEST_LOCATION );
+
+    std::ostringstream cullModeString;
+    cullModeString << GL_BACK;
+
+    DALI_TEST_CHECK( cullFaceStack.FindMethodAndParams( "CullFace", cullModeString.str() ) );
+    cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
+    DALI_TEST_CHECK( static_cast< Dali::Renderer::FaceCullingMode >( cullFace ) == Renderer::CULL_BACK );
+  }
+
+  {
+    cullFaceStack.Reset();
+    renderer.SetProperty( Renderer::Property::FACE_CULLING_MODE, Renderer::CULL_FRONT );
+    application.SendNotification();
+    application.Render();
+
+    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 1, TEST_LOCATION );
+
+    std::ostringstream cullModeString;
+    cullModeString << GL_FRONT;
+
+    DALI_TEST_CHECK( cullFaceStack.FindMethodAndParams( "CullFace", cullModeString.str() ) );
+    cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
+    DALI_TEST_CHECK( static_cast< Dali::Renderer::FaceCullingMode >( cullFace ) == Renderer::CULL_FRONT );
+  }
+
+  {
+    cullFaceStack.Reset();
+    renderer.SetProperty( Renderer::Property::FACE_CULLING_MODE, Renderer::NONE );
+    application.SendNotification();
+    application.Render();
+
+    DALI_TEST_EQUALS( cullFaceStack.CountMethod( "CullFace" ), 0, TEST_LOCATION );
+    cullFace = renderer.GetProperty<int>( Renderer::Property::FACE_CULLING_MODE );
+    DALI_TEST_CHECK( static_cast< Dali::Renderer::FaceCullingMode >( cullFace ) == Renderer::NONE );
+  }
+
+  END_TEST;
+}
+
+int UtcDaliRendererBlendingOptions01(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test SetBlendFunc(src, dest) ");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  // set a transparent actor color so that blending is enabled
+  actor.SetOpacity( 0.5f );
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetBlendFunc(BlendingFactor::ONE_MINUS_SRC_COLOR, BlendingFactor::SRC_ALPHA_SATURATE);
+
+  // Test that Set was successful:
+  BlendingFactor::Type srcFactorRgb( BlendingFactor::ZERO );
+  BlendingFactor::Type destFactorRgb( BlendingFactor::ZERO );
+  BlendingFactor::Type srcFactorAlpha( BlendingFactor::ZERO );
+  BlendingFactor::Type destFactorAlpha( BlendingFactor::ZERO );
+  renderer.GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+
+  DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_SRC_COLOR, srcFactorRgb,    TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingFactor::SRC_ALPHA_SATURATE,  destFactorRgb,   TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_SRC_COLOR, srcFactorAlpha,  TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingFactor::SRC_ALPHA_SATURATE,  destFactorAlpha, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render();
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+
+  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_SRC_COLOR, glAbstraction.GetLastBlendFuncSrcRgb(),   TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_SRC_ALPHA_SATURATE,  glAbstraction.GetLastBlendFuncDstRgb(),   TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_SRC_COLOR, glAbstraction.GetLastBlendFuncSrcAlpha(), TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_SRC_ALPHA_SATURATE,  glAbstraction.GetLastBlendFuncDstAlpha(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererBlendingOptions02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test SetBlendFunc(srcRgb, destRgb, srcAlpha, destAlpha) ");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.SetOpacity( 0.5f ); // enable blending
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetBlendFunc( BlendingFactor::CONSTANT_COLOR, BlendingFactor::ONE_MINUS_CONSTANT_COLOR,
+                         BlendingFactor::CONSTANT_ALPHA, BlendingFactor::ONE_MINUS_CONSTANT_ALPHA );
+
+  // Test that Set was successful:
+  {
+    BlendingFactor::Type srcFactorRgb( BlendingFactor::ZERO );
+    BlendingFactor::Type destFactorRgb( BlendingFactor::ZERO );
+    BlendingFactor::Type srcFactorAlpha( BlendingFactor::ZERO );
+    BlendingFactor::Type destFactorAlpha( BlendingFactor::ZERO );
+    renderer.GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+
+    DALI_TEST_EQUALS( BlendingFactor::CONSTANT_COLOR,            srcFactorRgb,    TEST_LOCATION );
+    DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_CONSTANT_COLOR,  destFactorRgb,   TEST_LOCATION );
+    DALI_TEST_EQUALS( BlendingFactor::CONSTANT_ALPHA,            srcFactorAlpha,  TEST_LOCATION );
+    DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_CONSTANT_ALPHA,  destFactorAlpha, TEST_LOCATION );
+  }
+
+  application.SendNotification();
+  application.Render();
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  DALI_TEST_EQUALS( (GLenum)GL_CONSTANT_COLOR,           glAbstraction.GetLastBlendFuncSrcRgb(),   TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_CONSTANT_COLOR, glAbstraction.GetLastBlendFuncDstRgb(),   TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_CONSTANT_ALPHA,           glAbstraction.GetLastBlendFuncSrcAlpha(), TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_ONE_MINUS_CONSTANT_ALPHA, glAbstraction.GetLastBlendFuncDstAlpha(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererBlendingOptions03(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test GetBlendEquation() defaults ");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  // Test the defaults as documented in blending.h
+  BlendingEquation::Type equationRgb( BlendingEquation::SUBTRACT );
+  BlendingEquation::Type equationAlpha( BlendingEquation::SUBTRACT );
+  renderer.GetBlendEquation( equationRgb, equationAlpha );
+  DALI_TEST_EQUALS( BlendingEquation::ADD, equationRgb, TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingEquation::ADD, equationAlpha, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererBlendingOptions04(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test SetBlendEquation() ");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.SetOpacity( 0.1f );
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  // Test the single blending equation setting
+  {
+    renderer.SetBlendEquation( BlendingEquation::REVERSE_SUBTRACT );
+    BlendingEquation::Type equationRgba( BlendingEquation::SUBTRACT );
+    renderer.GetBlendEquation( equationRgba, equationRgba );
+    DALI_TEST_EQUALS( BlendingEquation::REVERSE_SUBTRACT, equationRgba, TEST_LOCATION );
+  }
+
+  renderer.SetBlendEquation( BlendingEquation::REVERSE_SUBTRACT, BlendingEquation::REVERSE_SUBTRACT );
+
+  // Test that Set was successful
+  {
+    BlendingEquation::Type equationRgb( BlendingEquation::SUBTRACT );
+    BlendingEquation::Type equationAlpha( BlendingEquation::SUBTRACT );
+    renderer.GetBlendEquation( equationRgb, equationAlpha );
+    DALI_TEST_EQUALS( BlendingEquation::REVERSE_SUBTRACT, equationRgb, TEST_LOCATION );
+    DALI_TEST_EQUALS( BlendingEquation::REVERSE_SUBTRACT, equationAlpha, TEST_LOCATION );
+  }
+
+  // Render & check GL commands
+  application.SendNotification();
+  application.Render();
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  DALI_TEST_EQUALS( (GLenum)GL_FUNC_REVERSE_SUBTRACT, glAbstraction.GetLastBlendEquationRgb(),   TEST_LOCATION );
+  DALI_TEST_EQUALS( (GLenum)GL_FUNC_REVERSE_SUBTRACT, glAbstraction.GetLastBlendEquationAlpha(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode01(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to on with an opaque color renders with blending enabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.SetOpacity( 0.98f );
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::ON);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode02(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to off with a transparent color renders with blending disabled (and not enabled)");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.SetOpacity( 0.15f );
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::OFF);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode03(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to auto with a transparent material color renders with blending enabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.SetOpacity( 0.75f );
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode04(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to auto with an opaque color renders with blending disabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode04b(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to auto with an opaque material color and a transparent actor color renders with blending enabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  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);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode04c(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test setting the blend mode to auto with an opaque material color and an opaque actor color renders with blending disabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Material material = CreateMaterial();
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  actor.SetColor( Color::MAGENTA );
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode05(void)
+{
+  TestApplication application;
+
+  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 );
+  Material material = CreateMaterial( image );
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode06(void)
+{
+  TestApplication application;
+  tet_infoline("Test setting the blend mode to auto with an opaque color and an image without an alpha channel and a shader with the hint OUTPUT_IS_TRANSPARENT renders with blending enabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_TRANSPARENT );
+  Material material = Material::New(shader);
+
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  std::ostringstream blendStr;
+  blendStr << GL_BLEND;
+  DALI_TEST_CHECK( glEnableStack.FindMethodAndParams( "Enable", blendStr.str().c_str() ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendMode07(void)
+{
+  TestApplication application;
+  tet_infoline("Test setting the blend mode to auto with an opaque color and an image without an alpha channel and a shader with the hint OUTPUT_IS_OPAQUE renders with blending disabled");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
+  Material material = Material::New(shader);
+  BufferImage image = BufferImage::New( 50, 50, Pixel::RGB888 );
+  material.AddTexture( image, "sTexture" );
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::AUTO);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+  glAbstraction.EnableEnableDisableCallTrace(true);
+
+  application.SendNotification();
+  application.Render();
+
+  TraceCallStack& glEnableStack = glAbstraction.GetEnableDisableTrace();
+  DALI_TEST_CHECK( ! glEnableStack.FindMethodAndParams( "Enable", "GL_BLEND" ) );
+
+  END_TEST;
+}
+
+int UtcDaliRendererGetBlendMode(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test GetBlendMode()");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
+  Material material = Material::New(shader);
+  Renderer renderer = Renderer::New( geometry, material );
+
+  // default value
+  unsigned int mode = renderer.GetProperty<int>( Renderer::Property::BLENDING_MODE );
+  DALI_TEST_EQUALS( static_cast< BlendingMode::Type >( mode ), BlendingMode::AUTO, TEST_LOCATION );
+
+  // ON
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::ON );
+  mode = renderer.GetProperty<int>( Renderer::Property::BLENDING_MODE );
+  DALI_TEST_EQUALS( static_cast< BlendingMode::Type >( mode ), BlendingMode::ON, TEST_LOCATION );
+
+  // OFF
+  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::OFF );
+  mode = renderer.GetProperty<int>( Renderer::Property::BLENDING_MODE );
+  DALI_TEST_EQUALS( static_cast< BlendingMode::Type >( mode ), BlendingMode::OFF, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererSetBlendColor(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test SetBlendColor(color)");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
+  Material material = Material::New(shader);
+  BufferImage image = BufferImage::New( 50, 50, Pixel::RGBA8888 );
+  material.AddTexture( image, "sTexture" );
+  Renderer renderer = Renderer::New( geometry, material );
+
+  Actor actor = Actor::New();
+  actor.AddRenderer(renderer);
+  actor.SetSize(400, 400);
+  Stage::GetCurrent().Add(actor);
+
+  TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
+
+  renderer.SetProperty( Renderer::Property::BLENDING_COLOR, Color::TRANSPARENT );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), Color::TRANSPARENT, TEST_LOCATION );
+
+  renderer.SetProperty( Renderer::Property::BLENDING_COLOR, Color::MAGENTA );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), Color::MAGENTA, TEST_LOCATION );
+
+  Vector4 color( 0.1f, 0.2f, 0.3f, 0.4f );
+  renderer.SetProperty( Renderer::Property::BLENDING_COLOR, color );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( glAbstraction.GetLastBlendColor(), color, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererGetBlendColor(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test GetBlendColor()");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
+  Material material = Material::New(shader);
+  Renderer renderer = Renderer::New( geometry, material );
+
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLENDING_COLOR ), Color::TRANSPARENT, TEST_LOCATION );
+
+  renderer.SetProperty( Renderer::Property::BLENDING_COLOR, Color::MAGENTA );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLENDING_COLOR ), Color::MAGENTA, TEST_LOCATION );
+
+  Vector4 color( 0.1f, 0.2f, 0.3f, 0.4f );
+  renderer.SetProperty( Renderer::Property::BLENDING_COLOR, color );
+  application.SendNotification();
+  application.Render();
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector4>( Renderer::Property::BLENDING_COLOR ), color, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliRendererPreMultipledAlpha(void)
+{
+  TestApplication application;
+
+  tet_infoline("Test BLEND_PRE_MULTIPLIED_ALPHA property");
+
+  Geometry geometry = CreateQuadGeometry();
+  Shader shader = Shader::New( "vertexSrc", "fragmentSrc", Shader::HINT_OUTPUT_IS_OPAQUE );
+  Material material = Material::New(shader);
+
+  Renderer renderer = Renderer::New( geometry, material );
+
+  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);
+
+  Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
+  bool preMultipliedAlpha;
+  DALI_TEST_CHECK( value.Get( preMultipliedAlpha ) );
+  DALI_TEST_CHECK( !preMultipliedAlpha );
+
+  BlendingFactor::Type srcFactorRgb( BlendingFactor::ZERO );
+  BlendingFactor::Type destFactorRgb( BlendingFactor::ZERO );
+  BlendingFactor::Type srcFactorAlpha( BlendingFactor::ZERO );
+  BlendingFactor::Type destFactorAlpha( BlendingFactor::ZERO );
+  renderer.GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  DALI_TEST_EQUALS( DEFAULT_BLENDING_SRC_FACTOR_RGB,    srcFactorRgb,    TEST_LOCATION );
+  DALI_TEST_EQUALS( DEFAULT_BLENDING_DEST_FACTOR_RGB,   destFactorRgb,   TEST_LOCATION );
+  DALI_TEST_EQUALS( DEFAULT_BLENDING_SRC_FACTOR_ALPHA,  srcFactorAlpha,  TEST_LOCATION );
+  DALI_TEST_EQUALS( DEFAULT_BLENDING_DEST_FACTOR_ALPHA, destFactorAlpha, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render();
+
+  Vector4 actualValue(Vector4::ZERO);
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  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);
+
+  application.SendNotification();
+  application.Render();
+
+  value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
+  DALI_TEST_CHECK( value.Get( preMultipliedAlpha ) );
+  DALI_TEST_CHECK( preMultipliedAlpha );
+
+  renderer.GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  DALI_TEST_EQUALS( BlendingFactor::ONE,    srcFactorRgb,    TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingFactor::ONE_MINUS_SRC_ALPHA,   destFactorRgb,   TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingFactor::ONE,  srcFactorAlpha,  TEST_LOCATION );
+  DALI_TEST_EQUALS( BlendingFactor::ONE, 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 );
+
+  END_TEST;
+}
+
 int UtcDaliRendererConstraint01(void)
 {
   TestApplication application;
@@ -1046,7 +1729,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Material material0 = Material::New( shader );
   material0.AddTexture( image0, "sTexture0" );
   Renderer renderer0 = Renderer::New( geometry, material0 );
-  renderer0.SetDepthIndex( 2 );
+  renderer0.SetProperty( Renderer::Property::DEPTH_INDEX, 2 );
   actor0.AddRenderer(renderer0);
   application.SendNotification();
   application.Render(0);
@@ -1056,7 +1739,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Material material1 = Material::New( shader );
   material1.AddTexture( image1, "sTexture1" );
   Renderer renderer1 = Renderer::New( geometry, material1 );
-  renderer1.SetDepthIndex( 0 );
+  renderer1.SetProperty( Renderer::Property::DEPTH_INDEX, 0 );
   actor0.AddRenderer(renderer1);
   application.SendNotification();
   application.Render(0);
@@ -1066,7 +1749,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Material material2 = Material::New( shader );
   material2.AddTexture( image2, "sTexture2" );
   Renderer renderer2 = Renderer::New( geometry, material2 );
-  renderer2.SetDepthIndex( 1 );
+  renderer2.SetProperty( Renderer::Property::DEPTH_INDEX, 1 );
   actor0.AddRenderer(renderer2);
   application.SendNotification();
   application.Render(0);
@@ -1076,7 +1759,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Material material3 = Material::New( shader );
   material3.AddTexture( image3, "sTexture3" );
   Renderer renderer3 = Renderer::New( geometry, material3 );
-  renderer3.SetDepthIndex( 1 );
+  renderer3.SetProperty( Renderer::Property::DEPTH_INDEX, 1 );
   actor1.AddRenderer(renderer3);
   application.SendNotification();
   application.Render(0);
@@ -1086,7 +1769,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Material material4 = Material::New( shader );
   material4.AddTexture( image4, "sTexture4" );
   Renderer renderer4 = Renderer::New( geometry, material4 );
-  renderer4.SetDepthIndex( 0 );
+  renderer4.SetProperty( Renderer::Property::DEPTH_INDEX, 0 );
   actor1.AddRenderer(renderer4);
   application.SendNotification();
   application.Render(0);
@@ -1096,7 +1779,7 @@ int UtcDaliRendererRenderOrder2DLayerMultipleRenderers(void)
   Material material5 = Material::New( shader );
   material5.AddTexture( image5, "sTexture5" );
   Renderer renderer5 = Renderer::New( geometry, material5 );
-  renderer5.SetDepthIndex( -1 );
+  renderer5.SetProperty( Renderer::Property::DEPTH_INDEX, -1 );
   actor1.AddRenderer(renderer5);
   application.SendNotification();
   application.Render(0);
index 359a7d2..8c734e0 100644 (file)
@@ -8,8 +8,9 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "r";
-  bool optRerunFailed(false);
+  const char* optString = "rs";
+  bool optRerunFailed(true);
+  bool optRunSerially(false);
 
   int nextOpt = 0;
   do
@@ -20,6 +21,9 @@ int main(int argc, char * const argv[])
       case 'r':
         optRerunFailed = true;
         break;
+      case 's':
+        optRunSerially = true;
+        break;
       case '?':
         TestHarness::Usage(argv[0]);
         exit(TestHarness::EXIT_STATUS_BAD_ARGUMENT);
@@ -29,7 +33,14 @@ int main(int argc, char * const argv[])
 
   if( optind == argc ) // no testcase name in argument list
   {
-    result = TestHarness::RunAllInParallel(argv[0], tc_array, optRerunFailed);
+    if( optRunSerially )
+    {
+      result = TestHarness::RunAll( argv[0], tc_array );
+    }
+    else
+    {
+      result = TestHarness::RunAllInParallel( argv[0], tc_array, optRerunFailed );
+    }
   }
   else
   {
index d8af042..4a12bdb 100644 (file)
@@ -43,24 +43,19 @@ void TestGlAbstraction::Initialize()
   mIsRenderbufferResult = 0;
   mIsShaderResult = 0;
   mIsTextureResult = 0;
-  mVertexAttribArrayChanged = false;
-
+  mActiveTextureUnit = 0;
   mCheckFramebufferStatusResult = 0;
   mFramebufferStatus = 0;
   mFramebufferColorAttached = 0;
   mFramebufferDepthAttached = 0;
   mFramebufferStencilAttached = 0;
-
   mNumBinaryFormats = 0;
   mBinaryFormats = 0;
   mProgramBinaryLength = 0;
-  mGetProgramBinaryCalled = false;
 
-  mLastAutoTextureIdUsed = 0;
+  mVertexAttribArrayChanged = false;
+  mGetProgramBinaryCalled = false;
 
-  mLastShaderIdUsed = 0;
-  mLastProgramIdUsed = 0;
-  mLastUniformIdUsed = 0;
   mLastShaderCompiled = 0;
   mLastClearBitMask = 0;
   mClearCount = 0;
@@ -71,6 +66,10 @@ void TestGlAbstraction::Initialize()
   mLastBlendFuncDstRgb    = 0;
   mLastBlendFuncSrcAlpha  = 0;
   mLastBlendFuncDstAlpha  = 0;
+  mLastAutoTextureIdUsed = 0;
+  mLastShaderIdUsed = 0;
+  mLastProgramIdUsed = 0;
+  mLastUniformIdUsed = 0;
 
   mUniforms.clear();
   mProgramUniforms1i.clear();
@@ -78,6 +77,11 @@ void TestGlAbstraction::Initialize()
   mProgramUniforms2f.clear();
   mProgramUniforms3f.clear();
   mProgramUniforms4f.clear();
+
+  for( unsigned int i=0; i<MAX_ATTRIBUTE_CACHE_SIZE; ++i )
+  {
+    mVertexAttribArrayState[i] = false;
+  }
 }
 
 void TestGlAbstraction::PreRender()
index 55beebc..332ddaa 100644 (file)
@@ -29,15 +29,18 @@ namespace TestHarness
 
 typedef std::map<int, TestCase> RunningTestCases;
 
-namespace
+const char* basename(const char* path)
 {
-const char* RED_COLOR="\e[1;31m";
-const char* GREEN_COLOR="\e[1;32m";
-const char* ASCII_RESET="\e[0m";
-const char* ASCII_BOLD="\e[1m";
+  const char* ptr=path;
+  const char* slash=NULL;
+  for( ; *ptr != '\0' ; ++ptr )
+  {
+    if(*ptr == '/') slash=ptr;
+  }
+  if(slash != NULL) ++slash;
+  return slash;
 }
 
-
 int RunTestCase( struct ::testcase_s& testCase )
 {
   int result = EXIT_STATUS_TESTCASE_FAILED;
@@ -71,7 +74,24 @@ int RunTestCaseInChildProcess( struct ::testcase_s& testCase, bool suppressOutpu
       close(STDOUT_FILENO);
       close(STDERR_FILENO);
     }
-    exit( RunTestCase( testCase ) );
+    else
+    {
+      printf("\n");
+      for(int i=0; i<80; ++i) printf("#");
+      printf("\nTC: %s\n", testCase.name);
+      fflush(stdout);
+    }
+
+    int status = RunTestCase( testCase );
+
+    if( ! suppressOutput )
+    {
+      fflush(stdout);
+      fflush(stderr);
+      fclose(stdout);
+      fclose(stderr);
+    }
+    exit( status );
   }
   else if(pid == -1)
   {
@@ -81,7 +101,7 @@ int RunTestCaseInChildProcess( struct ::testcase_s& testCase, bool suppressOutpu
   else // Parent process
   {
     int status = 0;
-    int childPid = waitpid(-1, &status, 0);
+    int childPid = waitpid(pid, &status, 0);
     if( childPid == -1 )
     {
       perror("waitpid");
@@ -100,38 +120,55 @@ int RunTestCaseInChildProcess( struct ::testcase_s& testCase, bool suppressOutpu
     }
     else if(WIFSIGNALED(status) )
     {
+      int signal = WTERMSIG(status);
       testResult = EXIT_STATUS_TESTCASE_ABORTED;
-
-#ifdef WCOREDUMP
-      if(WCOREDUMP(status))
+      if( signal == SIGABRT )
+      {
+        printf("Test case %s failed: test case asserted\n", testCase.name );
+      }
+      else
       {
-        printf("Test case %s failed: due to a crash\n", testCase.name);
+        printf("Test case %s failed: exit with signal %s\n", testCase.name, strsignal(WTERMSIG(status)));
       }
-#endif
-      printf("Test case %s failed: exit with signal %s\n", testCase.name, strsignal(WTERMSIG(status)));
     }
     else if(WIFSTOPPED(status))
     {
       printf("Test case %s failed: stopped with signal %s\n", testCase.name, strsignal(WSTOPSIG(status)));
     }
   }
+  fflush(stdout);
+  fflush(stderr);
   return testResult;
 }
 
-void OutputStatistics( int numPasses, int numFailures )
+void OutputStatistics( const char* processName, int numPasses, int numFailures )
 {
-  const char* failureColor = GREEN_COLOR;
-  if( numFailures > 0 )
+  FILE* fp=fopen("summary.xml", "a");
+  if( fp != NULL )
   {
-    failureColor = RED_COLOR;
+    fprintf( fp,
+             "  <suite name=\"%s\">\n"
+             "    <total_case>%d</total_case>\n"
+             "    <pass_case>%d</pass_case>\n"
+             "    <pass_rate>%5.2f</pass_rate>\n"
+             "    <fail_case>%d</fail_case>\n"
+             "    <fail_rate>%5.2f</fail_rate>\n"
+             "    <block_case>0</block_case>\n"
+             "    <block_rate>0.00</block_rate>\n"
+             "    <na_case>0</na_case>\n"
+             "    <na_rate>0.00</na_rate>\n"
+             "  </suite>\n",
+             basename(processName),
+             numPasses+numFailures,
+             numPasses,
+             (float)numPasses/(numPasses+numFailures),
+             numFailures,
+             (float)numFailures/(numPasses+numFailures) );
+    fclose(fp);
   }
-  printf("\rNumber of test passes:   %s%4d (%5.2f%%)%s\n", ASCII_BOLD, numPasses, 100.0f * (float)numPasses / (numPasses+numFailures),  ASCII_RESET);
-  printf("%sNumber of test failures:%s %s%4d%s\n", failureColor, ASCII_RESET, ASCII_BOLD, numFailures, ASCII_RESET);
-
 }
 
-
-int RunAll(const char* processName, ::testcase tc_array[], bool reRunFailed)
+int RunAll( const char* processName, ::testcase tc_array[] )
 {
   int numFailures = 0;
   int numPasses = 0;
@@ -139,7 +176,7 @@ int RunAll(const char* processName, ::testcase tc_array[], bool reRunFailed)
   // Run test cases in child process( to kill output/handle signals ), but run serially.
   for( unsigned int i=0; tc_array[i].name; i++)
   {
-    int result = RunTestCaseInChildProcess( tc_array[i], true );
+    int result = RunTestCaseInChildProcess( tc_array[i], false );
     if( result == 0 )
     {
       numPasses++;
@@ -150,13 +187,11 @@ int RunAll(const char* processName, ::testcase tc_array[], bool reRunFailed)
     }
   }
 
-  OutputStatistics(numPasses, numFailures);
+  OutputStatistics( processName, numPasses, numFailures);
 
   return numFailures;
 }
 
-
-
 // Constantly runs up to MAX_NUM_CHILDREN processes
 int RunAllInParallel(  const char* processName, ::testcase tc_array[], bool reRunFailed)
 {
@@ -250,7 +285,7 @@ int RunAllInParallel(  const char* processName, ::testcase tc_array[], bool reRu
     }
   }
 
-  OutputStatistics( numPasses, numFailures );
+  OutputStatistics( processName, numPasses, numFailures );
 
   if( reRunFailed )
   {
index e6dc517..53ac0b9 100644 (file)
@@ -85,10 +85,9 @@ int RunAllInParallel(const char* processName, testcase tc_array[], bool reRunFai
  * Run all test cases in serial
  * @param[in] processName The name of this process
  * @param[in] tc_array The array of auto-generated testkit-lite test cases
- * @param[in] reRunFailed True if failed test cases should be re-run
  * @return 0 on success
  */
-int RunAll(const char* processName, testcase tc_array[], bool reRunFailed);
+int RunAll( const char* processName, testcase tc_array[] );
 
 /**
  * Find the named test case in the given array, and run it
index f8bd4de..d0a829d 100644 (file)
@@ -8,8 +8,9 @@ int main(int argc, char * const argv[])
 {
   int result = TestHarness::EXIT_STATUS_BAD_ARGUMENT;
 
-  const char* optString = "r";
-  bool optRerunFailed(false);
+  const char* optString = "rs";
+  bool optRerunFailed(true);
+  bool optRunSerially(false);
 
   int nextOpt = 0;
   do
@@ -20,6 +21,9 @@ int main(int argc, char * const argv[])
       case 'r':
         optRerunFailed = true;
         break;
+      case 's':
+        optRunSerially = true;
+        break;
       case '?':
         TestHarness::Usage(argv[0]);
         exit(TestHarness::EXIT_STATUS_BAD_ARGUMENT);
@@ -29,7 +33,14 @@ int main(int argc, char * const argv[])
 
   if( optind == argc ) // no testcase name in argument list
   {
-    result = TestHarness::RunAllInParallel(argv[0], tc_array, optRerunFailed);
+    if( optRunSerially )
+    {
+      result = TestHarness::RunAll( argv[0], tc_array );
+    }
+    else
+    {
+      result = TestHarness::RunAllInParallel( argv[0], tc_array, optRerunFailed );
+    }
   }
   else
   {
index fec88e8..5a288f4 100644 (file)
@@ -2015,7 +2015,101 @@ int UtcDaliAnimationPauseP(void)
   END_TEST;
 }
 
-int UtcDaliAnimationStoP(void)
+
+int UtcDaliAnimationGetStateP(void)
+{
+  TestApplication application;
+
+  Actor actor = Actor::New();
+  Stage::GetCurrent().Add(actor);
+
+  // Build the animation
+  float durationSeconds(1.0f);
+  Animation animation = Animation::New(durationSeconds);
+  Vector3 targetPosition(100.0f, 100.0f, 100.0f);
+  animation.AnimateTo(Property(actor, Actor::Property::POSITION), targetPosition, AlphaFunction::LINEAR);
+  DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION );
+
+  Vector3 fiftyPercentProgress(targetPosition * 0.5f);
+
+  // Start the animation
+  animation.Play();
+
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
+
+  bool signalReceived(false);
+  AnimationFinishCheck finishCheck(signalReceived);
+  animation.FinishedSignal().Connect(&application, finishCheck);
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(durationSeconds*500.0f)/* 50% progress */);
+
+  // We didn't expect the animation to finish yet
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
+  DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION );
+
+  // Pause the animation
+  animation.Pause();
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION );
+  application.SendNotification();
+  application.Render(0.f);
+
+  // Loop 5 times
+  for (int i=0; i<5; ++i)
+  {
+    application.Render(static_cast<unsigned int>(durationSeconds*500.0f));
+
+    // We didn't expect the animation to finish yet
+    application.SendNotification();
+    finishCheck.CheckSignalNotReceived();
+    DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION );
+    DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION );
+  }
+
+  // Keep going
+  finishCheck.Reset();
+  animation.Play();
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(durationSeconds*490.0f)/*slightly less than the animation duration*/);
+  // We didn't expect the animation to finish yet
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/);
+
+  // We did expect the animation to finish
+  application.SendNotification();
+  finishCheck.CheckSignalReceived();
+  DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+  DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION );
+
+  // Check that nothing has changed after a couple of buffer swaps
+  application.Render(0);
+  DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+  application.Render(0);
+  DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+  DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION );
+
+  // re-play
+  finishCheck.Reset();
+  animation.Play();
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
+  application.SendNotification();
+  application.Render(static_cast<unsigned int>(durationSeconds*490.0f)/*slightly less than the animation duration*/);
+  application.SendNotification();
+  finishCheck.CheckSignalNotReceived();
+  DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
+
+
+  END_TEST;
+}
+
+int UtcDaliAnimationStopP(void)
 {
   TestApplication application;
 
index 00af995..3db7952 100644 (file)
@@ -151,75 +151,6 @@ std::size_t Material::GetNumberOfTextures() const
 }
 
 
-void Material::SetFaceCullingMode( FaceCullingMode cullingMode )
-{
-  GetImplementation(*this).SetFaceCullingMode( cullingMode );
-}
-
-Material::FaceCullingMode Material::GetFaceCullingMode()
-{
-  return GetImplementation(*this).GetFaceCullingMode();
-}
-
-void Material::SetBlendMode( BlendingMode::Type mode )
-{
-  GetImplementation(*this).SetBlendMode( mode );
-}
-
-BlendingMode::Type Material::GetBlendMode() const
-{
-  return GetImplementation(*this).GetBlendMode();
-}
-
-void Material::SetBlendFunc( BlendingFactor::Type srcFactorRgba,
-                             BlendingFactor::Type destFactorRgba )
-{
-  GetImplementation(*this).SetBlendFunc( srcFactorRgba, destFactorRgba );
-}
-
-void Material::SetBlendFunc( BlendingFactor::Type srcFactorRgb,
-                             BlendingFactor::Type destFactorRgb,
-                             BlendingFactor::Type srcFactorAlpha,
-                             BlendingFactor::Type destFactorAlpha )
-{
-  GetImplementation(*this).SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-}
-
-void Material::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,
-                             BlendingFactor::Type& destFactorRgb,
-                             BlendingFactor::Type& srcFactorAlpha,
-                             BlendingFactor::Type& destFactorAlpha ) const
-{
-  GetImplementation(*this).GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-}
-
-void Material::SetBlendEquation( BlendingEquation::Type equationRgba )
-{
-  GetImplementation(*this).SetBlendEquation( equationRgba );
-}
-
-void Material::SetBlendEquation( BlendingEquation::Type equationRgb,
-                                 BlendingEquation::Type equationAlpha )
-{
-  GetImplementation(*this).SetBlendEquation( equationRgb, equationAlpha );
-}
-
-void Material::GetBlendEquation( BlendingEquation::Type& equationRgb,
-                                 BlendingEquation::Type& equationAlpha ) const
-{
-  GetImplementation(*this).GetBlendEquation( equationRgb, equationAlpha );
-}
-
-void Material::SetBlendColor( const Vector4& color )
-{
-  GetImplementation(*this).SetBlendColor( color );
-}
-
-Vector4 Material::GetBlendColor() const
-{
-  return GetImplementation(*this).GetBlendColor();
-}
-
 Material::Material( Internal::Material* pointer )
 : Handle( pointer )
 {
index 48b5d6c..0ba12f5 100644 (file)
 #include <string> // std::string
 
 // INTERNAL INCLUDES
-#include <dali/public-api/actors/blending.h> // Dali::BlendingMode, Dali::BlendingEquation, Dali::BlendingFactor
 #include <dali/public-api/images/image.h> // Dali::Image
 #include <dali/public-api/object/handle.h> // Dali::Handle
-#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
 #include <dali/devel-api/rendering/sampler.h> // Dali::Sampler
 #include <dali/devel-api/rendering/shader.h> // Dali::Shader
 
@@ -46,36 +44,6 @@ class DALI_IMPORT_API Material : public Handle
 public:
 
   /**
-   * @brief Set face culling mode.
-   */
-  enum FaceCullingMode
-  {
-    NONE,                     ///< None of the faces should be culled
-    CULL_FRONT,               ///< Cull front face, back face should never be shown
-    CULL_BACK,                ///< Cull back face, back face should never be shown
-    CULL_BACK_AND_FRONT,      ///< Cull back and front faces, if the geometry is composed of triangles none of the faces will be shown
-  };
-
-  /**
-   * @brief An enumeration of properties belonging to the Material class.
-   */
-  struct Property
-  {
-    enum
-    {
-      FACE_CULLING_MODE = DEFAULT_OBJECT_PROPERTY_START_INDEX, ///< name "faceCullingMode",                type INTEGER
-      BLENDING_MODE,                                           ///< name "blendingMode",                   type INTEGER
-      BLEND_EQUATION_RGB,                                      ///< name "blendEquationRgb",               type INTEGER
-      BLEND_EQUATION_ALPHA,                                    ///< name "blendEquationAlpha",             type INTEGER
-      BLENDING_SRC_FACTOR_RGB,                                 ///< name "sourceBlendFactorRgb",           type INTEGER
-      BLENDING_DEST_FACTOR_RGB,                                ///< name "destinationBlendFactorRgb",      type INTEGER
-      BLENDING_SRC_FACTOR_ALPHA,                               ///< name "sourceBlendFactorAlpha",         type INTEGER
-      BLENDING_DEST_FACTOR_ALPHA,                              ///< name "destinationBlendFactorAlpha",    type INTEGER
-      BLEND_COLOR,                                             ///< name "blendColor",                     type VECTOR4
-    };
-  };
-
-  /**
    * @brief Creates a new Material object
    *
    * @return A handle to a newly allocated Material
@@ -207,133 +175,6 @@ public:
    */
   std::size_t GetNumberOfTextures() const;
 
-  /**
-   * @brief Set the culling mode for this material
-   *
-   * Calling this function sets the property CULLING_MODE
-   *
-   * @param[in] cullingMode The culling mode for this material
-   */
-  void SetFaceCullingMode( FaceCullingMode cullingMode );
-
-  /**
-   * @brief Get the face culling mode for this material
-   *
-   * @return The face culling mode for this material
-   */
-  FaceCullingMode GetFaceCullingMode();
-
-  /**
-   * @brief Sets the blending mode.
-   *
-   * Possible values are: BlendingMode::OFF, BlendingMode::AUTO and BlendingMode::ON. Default is BlendingMode::AUTO.
-   *
-   * If blending is disabled (BlendingMode::OFF) fade in and fade out animations do not work.
-   *
-   * <ul>
-   *   <li> \e OFF Blending is disabled.
-   *   <li> \e AUTO Blending is enabled only if the renderable actor has alpha channel.
-   *   <li> \e ON Blending is enabled.
-   * </ul>
-   *
-   * @param[in] mode The blending mode.
-   */
-  void SetBlendMode( BlendingMode::Type mode );
-
-  /**
-   * @brief Retrieves the blending mode.
-   *
-   * @return The blending mode, one of BlendingMode::OFF, BlendingMode::AUTO or BlendingMode::ON.
-   */
-  BlendingMode::Type GetBlendMode() const;
-
-  /**
-   * @brief Specify the pixel arithmetic used when the actor is blended.
-   *
-   * @param[in] srcFactorRgba Specifies how the red, green, blue, and alpha source blending factors are computed.
-   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
-   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
-   * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.
-   *
-   * @param[in] destFactorRgba Specifies how the red, green, blue, and alpha destination blending factors are computed.
-   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
-   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
-   * GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.
-   */
-  void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
-
-  /**
-   * @brief Specify the pixel arithmetic used when the actor is blended.
-   *
-   * @param[in] srcFactorRgb Specifies how the red, green, and blue source blending factors are computed.
-   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
-   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
-   * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.
-   *
-   * @param[in] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
-   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
-   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
-   * GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.
-   *
-   * @param[in] srcFactorAlpha Specifies how the alpha source blending factor is computed.
-   * The options are the same as for srcFactorRgb.
-   *
-   * @param[in] destFactorAlpha Specifies how the alpha source blending factor is computed.
-   * The options are the same as for destFactorRgb.
-   */
-  void SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
-                     BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
-
-  /**
-   * @brief Query the pixel arithmetic used when the actor is blended.
-   *
-   * @param[out] srcFactorRgb Specifies how the red, green, blue, and alpha source blending factors are computed.
-   * @param[out] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
-   * @param[out] srcFactorAlpha Specifies how the red, green, blue, and alpha source blending factors are computed.
-   * @param[out] destFactorAlpha Specifies how the red, green, blue, and alpha destination blending factors are computed.
-   */
-  void GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
-                     BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
-
-  /**
-   * @brief Specify the equation used when the actor is blended.
-   *
-   * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
-   * @param[in] equationRgba The equation used for combining red, green, blue, and alpha components.
-   */
-  void SetBlendEquation( BlendingEquation::Type equationRgba );
-
-  /**
-   * @brief Specify the equation used when the actor is blended.
-   *
-   * @param[in] equationRgb The equation used for combining red, green, and blue components.
-   * @param[in] equationAlpha The equation used for combining the alpha component.
-   * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
-   */
-  void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
-
-  /**
-   * @brief Query the equation used when the actor is blended.
-   *
-   * @param[out] equationRgb The equation used for combining red, green, and blue components.
-   * @param[out] equationAlpha The equation used for combining the alpha component.
-   */
-  void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
-
-  /**
-   * @brief Specify the color used when the actor is blended; the default is Vector4::ZERO.
-   *
-   * @param[in] color The blend color.
-   */
-  void SetBlendColor( const Vector4& color );
-
-  /**
-   * @brief Query the color used when the actor is blended.
-   *
-   * @return The blend color.
-   */
-  Vector4 GetBlendColor() const;
-
 public:
   /**
    * @brief The constructor
index a3080e9..bc1aea6 100644 (file)
@@ -80,14 +80,43 @@ Material Renderer::GetMaterial() const
   return Dali::Material( materialPtr );
 }
 
-void Renderer::SetDepthIndex( int depthIndex )
+void Renderer::SetBlendFunc( BlendingFactor::Type srcFactorRgba,
+                             BlendingFactor::Type destFactorRgba )
 {
-  GetImplementation(*this).SetDepthIndex( depthIndex );
+  GetImplementation(*this).SetBlendFunc( srcFactorRgba, destFactorRgba );
 }
 
-int Renderer::GetDepthIndex()
+void Renderer::SetBlendFunc( BlendingFactor::Type srcFactorRgb,
+                             BlendingFactor::Type destFactorRgb,
+                             BlendingFactor::Type srcFactorAlpha,
+                             BlendingFactor::Type destFactorAlpha )
 {
-  return GetImplementation(*this).GetDepthIndex();
+  GetImplementation(*this).SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+}
+
+void Renderer::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,
+                             BlendingFactor::Type& destFactorRgb,
+                             BlendingFactor::Type& srcFactorAlpha,
+                             BlendingFactor::Type& destFactorAlpha ) const
+{
+  GetImplementation(*this).GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+}
+
+void Renderer::SetBlendEquation( BlendingEquation::Type equationRgba )
+{
+  GetImplementation(*this).SetBlendEquation( equationRgba );
+}
+
+void Renderer::SetBlendEquation( BlendingEquation::Type equationRgb,
+                                 BlendingEquation::Type equationAlpha )
+{
+  GetImplementation(*this).SetBlendEquation( equationRgb, equationAlpha );
+}
+
+void Renderer::GetBlendEquation( BlendingEquation::Type& equationRgb,
+                                 BlendingEquation::Type& equationAlpha ) const
+{
+  GetImplementation(*this).GetBlendEquation( equationRgb, equationAlpha );
 }
 
 Renderer::Renderer( Internal::Renderer* pointer )
index 1b1ff96..425c8c9 100644 (file)
@@ -22,8 +22,9 @@
 #include <string> // std::string
 
 // INTERNAL INCLUDES
+#include <dali/public-api/actors/blending.h> // Dali::BlendingMode, Dali::BlendingEquation, Dali::BlendingFactor
 #include <dali/public-api/object/handle.h> // Dali::Handle
-#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_DERIVED_HANDLE_PROPERTY_START_INDEX
+#include <dali/public-api/object/property-index-ranges.h> // DEFAULT_OBJECT_PROPERTY_START_INDEX
 #include <dali/devel-api/rendering/geometry.h> // Dali::Geometry
 #include <dali/devel-api/rendering/material.h> // Dali::Material
 
@@ -43,6 +44,17 @@ class DALI_IMPORT_API Renderer : public Handle
 public:
 
   /**
+   * @brief Set face culling mode.
+   */
+  enum FaceCullingMode
+  {
+    NONE,                     ///< None of the faces should be culled
+    CULL_FRONT,               ///< Cull front face, back face should never be shown
+    CULL_BACK,                ///< Cull back face, back face should never be shown
+    CULL_BACK_AND_FRONT,      ///< Cull back and front faces, if the geometry is composed of triangles none of the faces will be shown
+  };
+
+  /**
    * @brief An enumeration of properties belonging to the Renderer class.
    */
   struct Property
@@ -50,6 +62,16 @@ public:
     enum
     {
       DEPTH_INDEX = DEFAULT_OBJECT_PROPERTY_START_INDEX,  ///< name "depthIndex",   type INTEGER
+      FACE_CULLING_MODE,                                  ///< name "faceCullingMode",                type INTEGER
+      BLENDING_MODE,                                      ///< name "blendingMode",                   type INTEGER
+      BLEND_EQUATION_RGB,                                 ///< name "blendEquationRgb",               type INTEGER
+      BLEND_EQUATION_ALPHA,                               ///< name "blendEquationAlpha",             type INTEGER
+      BLENDING_SRC_FACTOR_RGB,                            ///< name "sourceBlendFactorRgb",           type INTEGER
+      BLENDING_DEST_FACTOR_RGB,                           ///< name "destinationBlendFactorRgb",      type INTEGER
+      BLENDING_SRC_FACTOR_ALPHA,                          ///< name "sourceBlendFactorAlpha",         type INTEGER
+      BLENDING_DEST_FACTOR_ALPHA,                         ///< name "destinationBlendFactorAlpha",    type INTEGER
+      BLENDING_COLOR,                                     ///< name "blendingColor",                     type VECTOR4
+      BLEND_PRE_MULTIPLIED_ALPHA,                         ///< name "blendPreMultipledAlpha",         type BOOLEAN
     };
   };
 
@@ -124,24 +146,77 @@ public:
   Material GetMaterial() const;
 
   /**
-   * @brief Set the depth index of this renderer
+   * @brief Specify the pixel arithmetic used when the actor is blended.
+   *
+   * @param[in] srcFactorRgba Specifies how the red, green, blue, and alpha source blending factors are computed.
+   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
+   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
+   * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.
+   *
+   * @param[in] destFactorRgba Specifies how the red, green, blue, and alpha destination blending factors are computed.
+   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
+   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
+   * GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.
+   */
+  void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
+
+  /**
+   * @brief Specify the pixel arithmetic used when the actor is blended.
+   *
+   * @param[in] srcFactorRgb Specifies how the red, green, and blue source blending factors are computed.
+   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
+   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
+   * GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.
+   *
+   * @param[in] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
+   * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
+   * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
+   * GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.
    *
-   * Renderer with higher depth indices are rendered in front of other renderers with smaller values
+   * @param[in] srcFactorAlpha Specifies how the alpha source blending factor is computed.
+   * The options are the same as for srcFactorRgb.
    *
-   * @param[in] depthIndex The depth index of this renderer
+   * @param[in] destFactorAlpha Specifies how the alpha source blending factor is computed.
+   * The options are the same as for destFactorRgb.
    */
-  void SetDepthIndex( int depthIndex );
+  void SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
+                     BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
 
-  //@todo No interface to remove geometry / material? I guess you have to throw away
-  // this renderer if you don't want it to work any more...
+  /**
+   * @brief Query the pixel arithmetic used when the actor is blended.
+   *
+   * @param[out] srcFactorRgb Specifies how the red, green, blue, and alpha source blending factors are computed.
+   * @param[out] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
+   * @param[out] srcFactorAlpha Specifies how the red, green, blue, and alpha source blending factors are computed.
+   * @param[out] destFactorAlpha Specifies how the red, green, blue, and alpha destination blending factors are computed.
+   */
+  void GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
+                     BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
+
+  /**
+   * @brief Specify the equation used when the actor is blended.
+   *
+   * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
+   * @param[in] equationRgba The equation used for combining red, green, blue, and alpha components.
+   */
+  void SetBlendEquation( BlendingEquation::Type equationRgba );
+
+  /**
+   * @brief Specify the equation used when the actor is blended.
+   *
+   * @param[in] equationRgb The equation used for combining red, green, and blue components.
+   * @param[in] equationAlpha The equation used for combining the alpha component.
+   * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
+   */
+  void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
 
   /**
-   * @brief Get the depth index of this renderer
+   * @brief Query the equation used when the actor is blended.
    *
-   * @sa SetDepthIndex()
-   * @return the depth index
+   * @param[out] equationRgb The equation used for combining red, green, and blue components.
+   * @param[out] equationAlpha The equation used for combining the alpha component.
    */
-  int GetDepthIndex();
+  void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
 
 public:
   /**
index 181b8f6..23810e4 100644 (file)
@@ -205,7 +205,7 @@ namespace Internal
 
 BlendingOptions::BlendingOptions()
 : mBitmask( 0u ),
-  mOptionalColor( NULL )
+  mBlendColor( NULL )
 {
   SetBlendFunc( DEFAULT_BLENDING_SRC_FACTOR_RGB,   DEFAULT_BLENDING_DEST_FACTOR_RGB,
                 DEFAULT_BLENDING_SRC_FACTOR_ALPHA, DEFAULT_BLENDING_DEST_FACTOR_ALPHA );
@@ -215,7 +215,7 @@ BlendingOptions::BlendingOptions()
 
 BlendingOptions::~BlendingOptions()
 {
-  delete mOptionalColor;
+  delete mBlendColor;
 }
 
 void BlendingOptions::SetBitmask( unsigned int bitmask )
@@ -277,39 +277,33 @@ BlendingEquation::Type BlendingOptions::GetBlendEquationAlpha() const
   return RetrieveBlendingEquation( mBitmask, MASK_EQUATION_ALPHA, SHIFT_TO_EQUATION_ALPHA );
 }
 
-bool BlendingOptions::SetBlendColor( const Vector4& color )
+void BlendingOptions::SetBlendColor( const Vector4& color )
 {
-  bool changed( false );
-
   if( Vector4::ZERO == color )
   {
-    if( mOptionalColor )
+    if( mBlendColor )
     {
       // Discard unnecessary vector
-      delete mOptionalColor;
-      mOptionalColor = NULL;
-
-      changed = true;
+      delete mBlendColor;
+      mBlendColor = NULL;
     }
+    return;
   }
-  else if( !mOptionalColor )
+
+  if( mBlendColor )
   {
-    // Lazy allocation when non-default is set
-    mOptionalColor = new Vector4( color );
-    changed = true;
+    *mBlendColor = color;
   }
-  else if( *mOptionalColor != color )
+  else
   {
-    *mOptionalColor = color;
-    changed = true;
+    // Lazy allocation when non-default is set
+    mBlendColor = new Vector4( color );
   }
-
-  return changed;
 }
 
 const Vector4* BlendingOptions::GetBlendColor() const
 {
-  return mOptionalColor;
+  return mBlendColor;
 }
 
 } // namespace Internal
index cc6a938..07f149f 100644 (file)
@@ -99,7 +99,7 @@ struct BlendingOptions
    * @param[in] color The blend color.
    * @return True if the blend color changed, otherwise it was already the same color.
    */
-  bool SetBlendColor( const Vector4& color );
+  void SetBlendColor( const Vector4& color );
 
   /**
    * Query the blend color.
@@ -119,7 +119,8 @@ private:
 
   unsigned int mBitmask; ///< A bitmask of blending options
 
-  Vector4* mOptionalColor; ///< A heap-allocated color (owned)
+  Vector4* mBlendColor; ///< A heap-allocated color (owned)
+
 };
 
 } // namespace Internal
index 347e56a..dcc99f2 100644 (file)
@@ -22,7 +22,7 @@
 #include <dali/public-api/actors/blending.h>
 #include <dali/public-api/shader-effects/shader-effect.h>
 #include <dali/devel-api/rendering/cull-face.h>
-#include <dali/devel-api/rendering/material.h>
+#include <dali/devel-api/rendering/renderer.h>
 #include <dali/internal/common/type-abstraction.h>
 #include <dali/internal/event/effects/shader-declarations.h>
 
@@ -33,7 +33,7 @@ namespace Internal
 {
 
 template <> struct ParameterType< CullFaceMode > : public BasicType< CullFaceMode > {};
-template <> struct ParameterType< Dali::Material::FaceCullingMode > : public BasicType< Dali::Material::FaceCullingMode > {};
+template <> struct ParameterType< Dali::Renderer::FaceCullingMode > : public BasicType< Dali::Renderer::FaceCullingMode > {};
 template <> struct ParameterType< BlendingMode::Type > : public BasicType< BlendingMode::Type > {};
 
 } //namespace Internal
index 19f6cd2..035b23c 100644 (file)
@@ -611,60 +611,60 @@ float ImageActor::GetSortModifier() const
 
 void ImageActor::SetCullFace(CullFaceMode mode)
 {
-  mRenderer->GetMaterial()->SetFaceCullingMode( static_cast< Dali::Material::FaceCullingMode >( mode ) );
+  mRenderer->SetFaceCullingMode( static_cast< Dali::Renderer::FaceCullingMode >( mode ) );
 }
 
 CullFaceMode ImageActor::GetCullFace() const
 {
-  return static_cast< CullFaceMode >( mRenderer->GetMaterial()->GetFaceCullingMode() );
+  return static_cast< CullFaceMode >( mRenderer->GetFaceCullingMode() );
 }
 
 void ImageActor::SetBlendMode( BlendingMode::Type mode )
 {
-  mRenderer->GetMaterial()->SetBlendMode( mode );
+  mRenderer->SetBlendMode( mode );
 }
 
 BlendingMode::Type ImageActor::GetBlendMode() const
 {
-  return mRenderer->GetMaterial()->GetBlendMode();
+  return mRenderer->GetBlendMode();
 }
 
 void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba,   BlendingFactor::Type destFactorRgba )
 {
-  mRenderer->GetMaterial()->SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
+  mRenderer->SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
 }
 
 void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
                                BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
 {
-  mRenderer->GetMaterial()->SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  mRenderer->SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
 }
 
 void ImageActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
                                BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
 {
-  mRenderer->GetMaterial()->GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  mRenderer->GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
 }
 
 void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgba )
 {
-  mRenderer->GetMaterial()->SetBlendEquation( equationRgba, equationRgba );
+  mRenderer->SetBlendEquation( equationRgba, equationRgba );
 }
 
 void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
 {
-  mRenderer->GetMaterial()->SetBlendEquation( equationRgb, equationAlpha );
+  mRenderer->SetBlendEquation( equationRgb, equationAlpha );
 }
 
 void ImageActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
 {
-  mRenderer->GetMaterial()->GetBlendEquation( equationRgb, equationAlpha );
+  mRenderer->GetBlendEquation( equationRgb, equationAlpha );
 }
 
 void ImageActor::SetBlendColor( const Vector4& color )
 {
   mBlendColor = color;
-  mRenderer->GetMaterial()->SetBlendColor( mBlendColor );
+  mRenderer->SetBlendColor( mBlendColor );
 }
 
 const Vector4& ImageActor::GetBlendColor() const
index 04ca30b..ec49265 100644 (file)
@@ -127,7 +127,8 @@ Animation::Animation( EventThreadServices& eventThreadServices, AnimationPlaylis
   mPlayRange( Vector2(0.0f,1.0f)),
   mEndAction( endAction ),
   mDisconnectAction( disconnectAction ),
-  mDefaultAlpha( defaultAlpha )
+  mDefaultAlpha( defaultAlpha ),
+  mState(Dali::Animation::STOPPED)
 {
 }
 
@@ -264,6 +265,8 @@ void Animation::Play()
   // Update the current playlist
   mPlaylist.OnPlay( *this );
 
+  mState = Dali::Animation::PLAYING;
+
   // mAnimation is being used in a separate thread; queue a Play message
   PlayAnimationMessage( mEventThreadServices, *mAnimation );
 }
@@ -275,6 +278,8 @@ void Animation::PlayFrom( float progress )
     // Update the current playlist
     mPlaylist.OnPlay( *this );
 
+    mState = Dali::Animation::PLAYING;
+
     // mAnimation is being used in a separate thread; queue a Play message
     PlayAnimationFromMessage( mEventThreadServices, *mAnimation, progress );
   }
@@ -282,12 +287,21 @@ void Animation::PlayFrom( float progress )
 
 void Animation::Pause()
 {
+  mState = Dali::Animation::PAUSED;
+
   // mAnimation is being used in a separate thread; queue a Pause message
   PauseAnimationMessage( mEventThreadServices, *mAnimation );
 }
 
+Dali::Animation::State Animation::GetState() const
+{
+  return mState;
+}
+
 void Animation::Stop()
 {
+  mState = Dali::Animation::STOPPED;
+
   // mAnimation is being used in a separate thread; queue a Stop message
   StopAnimationMessage( mEventThreadServices.GetUpdateManager(), *mAnimation );
 }
@@ -747,6 +761,8 @@ bool Animation::HasFinished()
     mNotificationCount = playedCount;
 
     hasFinished = true;
+
+    mState = Dali::Animation::STOPPED;
   }
 
   return hasFinished;
index f3ade18..8eb5257 100644 (file)
@@ -159,6 +159,11 @@ public:
   void Pause();
 
   /**
+   * @copydoc Dali::Animation::GetState()
+   */
+  Dali::Animation::State GetState() const;
+
+  /**
    * @copydoc Dali::Animation::Stop()
    */
   void Stop();
@@ -467,6 +472,7 @@ private:
   EndAction mEndAction;
   EndAction mDisconnectAction;
   AlphaFunction mDefaultAlpha;
+  Dali::Animation::State mState;
 
 };
 
index 016aa12..8c25056 100644 (file)
@@ -77,7 +77,7 @@ struct ObjectImplHelper
   {
     indices.Reserve( DEFAULT_PROPERTY_COUNT );
 
-    for( unsigned int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
+    for( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
     {
       indices.PushBack( DEFAULT_OBJECT_PROPERTY_START_INDEX + i );
     }
@@ -104,7 +104,7 @@ struct ObjectImplHelper
     // debug only, wouldn't need to make this assumption.
 
     // Look for name in default properties
-    for( unsigned int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
+    for( int i = 0; i < DEFAULT_PROPERTY_COUNT; ++i )
     {
       const Internal::PropertyDetails* property = &DEFAULT_PROPERTY_DETAILS[ i ];
       if( 0 == strcmp( name.c_str(), property->name ) ) // dont want to convert rhs to string
index 054df46..abac5a4 100644 (file)
@@ -37,22 +37,7 @@ namespace Internal
 namespace
 {
 
-/**
- *            |name                              |type     |writable|animatable|constraint-input|enum for index-checking|
- */
-DALI_PROPERTY_TABLE_BEGIN
-DALI_PROPERTY( "faceCullingMode",                 INTEGER,   true, false,  false, Dali::Material::Property::FACE_CULLING_MODE )
-DALI_PROPERTY( "blendingMode",                    INTEGER,   true, false,  false, Dali::Material::Property::BLENDING_MODE )
-DALI_PROPERTY( "blendEquationRgb",                INTEGER,   true, false,  false, Dali::Material::Property::BLEND_EQUATION_RGB )
-DALI_PROPERTY( "blendEquationAlpha",              INTEGER,   true, false,  false, Dali::Material::Property::BLEND_EQUATION_ALPHA )
-DALI_PROPERTY( "sourceBlendFactorRgb",            INTEGER,   true, false,  false, Dali::Material::Property::BLENDING_SRC_FACTOR_RGB )
-DALI_PROPERTY( "destinationBlendFactorRgb",       INTEGER,   true, false,  false, Dali::Material::Property::BLENDING_DEST_FACTOR_RGB )
-DALI_PROPERTY( "sourceBlendFactorAlpha",          INTEGER,   true, false,  false, Dali::Material::Property::BLENDING_SRC_FACTOR_ALPHA )
-DALI_PROPERTY( "destinationBlendFactorAlpha",     INTEGER,   true, false,  false, Dali::Material::Property::BLENDING_DEST_FACTOR_ALPHA )
-DALI_PROPERTY( "blendColor",                      VECTOR4,   true, false,  false, Dali::Material::Property::BLEND_COLOR )
-DALI_PROPERTY_TABLE_END( DEFAULT_ACTOR_PROPERTY_START_INDEX )
-
-const ObjectImplHelper<DEFAULT_PROPERTY_COUNT> MATERIAL_IMPL = { DEFAULT_PROPERTY_DETAILS };
+const ObjectImplHelper<0> MATERIAL_IMPL = { NULL };
 
 BaseHandle Create()
 {
@@ -206,105 +191,6 @@ size_t Material::GetNumberOfTextures() const
   return mTextures.size();
 }
 
-void Material::SetFaceCullingMode( Dali::Material::FaceCullingMode cullingMode )
-{
-  if( mFaceCullingMode != cullingMode )
-  {
-    mFaceCullingMode = cullingMode;
-
-    SetFaceCullingModeMessage( GetEventThreadServices(), *mSceneObject, mFaceCullingMode );
-  }
-}
-
-Dali::Material::FaceCullingMode Material::GetFaceCullingMode()
-{
-  return mFaceCullingMode;
-}
-
-void Material::SetBlendMode( BlendingMode::Type mode )
-{
-  if( mBlendingMode != mode )
-  {
-    mBlendingMode = mode;
-
-    SetBlendingModeMessage( GetEventThreadServices(), *mSceneObject, mBlendingMode );
-  }
-}
-
-BlendingMode::Type Material::GetBlendMode() const
-{
-  return mBlendingMode;
-}
-
-void Material::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
-{
-  mBlendingOptions.SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
-  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
-}
-
-void Material::SetBlendFunc( BlendingFactor::Type srcFactorRgb,
-                             BlendingFactor::Type destFactorRgb,
-                             BlendingFactor::Type srcFactorAlpha,
-                             BlendingFactor::Type destFactorAlpha )
-{
-  mBlendingOptions.SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
-}
-
-void Material::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,
-                             BlendingFactor::Type& destFactorRgb,
-                             BlendingFactor::Type& srcFactorAlpha,
-                             BlendingFactor::Type& destFactorAlpha ) const
-{
-  srcFactorRgb    = mBlendingOptions.GetBlendSrcFactorRgb();
-  destFactorRgb   = mBlendingOptions.GetBlendDestFactorRgb();
-  srcFactorAlpha  = mBlendingOptions.GetBlendSrcFactorAlpha();
-  destFactorAlpha = mBlendingOptions.GetBlendDestFactorAlpha();
-}
-
-void Material::SetBlendEquation( BlendingEquation::Type equationRgba )
-{
-  mBlendingOptions.SetBlendEquation( equationRgba, equationRgba );
-  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
-}
-
-void Material::SetBlendEquation( BlendingEquation::Type equationRgb,
-                                 BlendingEquation::Type equationAlpha )
-{
-  mBlendingOptions.SetBlendEquation( equationRgb, equationAlpha );
-  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
-}
-
-void Material::GetBlendEquation( BlendingEquation::Type& equationRgb,
-                                 BlendingEquation::Type& equationAlpha ) const
-{
-  // These are not animatable, the cached values are up-to-date.
-  equationRgb   = mBlendingOptions.GetBlendEquationRgb();
-  equationAlpha = mBlendingOptions.GetBlendEquationAlpha();
-}
-
-void Material::SetBlendColor( const Vector4& color )
-{
-  if( !mBlendColor )
-  {
-    mBlendColor = new Vector4();
-  }
-  if( *mBlendColor != color )
-  {
-    *mBlendColor = color;
-    SetBlendColorMessage( GetEventThreadServices(), *mSceneObject, *mBlendColor );
-  }
-}
-
-Vector4 Material::GetBlendColor() const
-{
-  if( mBlendColor )
-  {
-    return *mBlendColor;
-  }
-  return Color::TRANSPARENT; // GL default
-}
-
 const SceneGraph::Material* Material::GetMaterialSceneObject() const
 {
   return mSceneObject;
@@ -353,126 +239,6 @@ Property::Type Material::GetDefaultPropertyType( Property::Index index ) const
 void Material::SetDefaultProperty( Property::Index index,
                                    const Property::Value& propertyValue )
 {
-  switch( index )
-  {
-    case Dali::Material::Property::FACE_CULLING_MODE:
-    {
-      int faceCullingMode;
-      if( propertyValue.Get( faceCullingMode ) )
-      {
-        SetFaceCullingMode( Dali::Material::FaceCullingMode( faceCullingMode ) );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLENDING_MODE:
-    {
-      int blendingMode;
-      if( propertyValue.Get( blendingMode ) )
-      {
-        SetBlendMode( BlendingMode::Type( blendingMode ) );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLEND_EQUATION_RGB:
-    {
-      int blendingEquation;
-      if( propertyValue.Get( blendingEquation ) )
-      {
-        BlendingEquation::Type alphaEquation = mBlendingOptions.GetBlendEquationAlpha();
-        mBlendingOptions.SetBlendEquation( static_cast<BlendingEquation::Type>( blendingEquation ), alphaEquation );
-        SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLEND_EQUATION_ALPHA:
-    {
-      int blendingEquation;
-      if( propertyValue.Get( blendingEquation ) )
-      {
-        BlendingEquation::Type rgbEquation = mBlendingOptions.GetBlendEquationRgb();
-        mBlendingOptions.SetBlendEquation( rgbEquation, static_cast<BlendingEquation::Type>( blendingEquation ) );
-        SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLENDING_SRC_FACTOR_RGB:
-    {
-      int blendingFactor;
-      if( propertyValue.Get( blendingFactor ) )
-      {
-        BlendingFactor::Type srcFactorRgb;
-        BlendingFactor::Type destFactorRgb;
-        BlendingFactor::Type srcFactorAlpha;
-        BlendingFactor::Type destFactorAlpha;
-        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-        SetBlendFunc( static_cast<BlendingFactor::Type>( blendingFactor ),
-                      destFactorRgb,
-                      srcFactorAlpha,
-                      destFactorAlpha );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLENDING_DEST_FACTOR_RGB:
-    {
-      int blendingFactor;
-      if( propertyValue.Get( blendingFactor ) )
-      {
-        BlendingFactor::Type srcFactorRgb;
-        BlendingFactor::Type destFactorRgb;
-        BlendingFactor::Type srcFactorAlpha;
-        BlendingFactor::Type destFactorAlpha;
-        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-        SetBlendFunc( srcFactorRgb,
-                      static_cast<BlendingFactor::Type>( blendingFactor ),
-                      srcFactorAlpha,
-                      destFactorAlpha );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLENDING_SRC_FACTOR_ALPHA:
-    {
-      int blendingFactor;
-      if( propertyValue.Get( blendingFactor ) )
-      {
-        BlendingFactor::Type srcFactorRgb;
-        BlendingFactor::Type destFactorRgb;
-        BlendingFactor::Type srcFactorAlpha;
-        BlendingFactor::Type destFactorAlpha;
-        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-        SetBlendFunc( srcFactorRgb,
-                      destFactorRgb,
-                      static_cast<BlendingFactor::Type>( blendingFactor ),
-                      destFactorAlpha );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLENDING_DEST_FACTOR_ALPHA:
-    {
-      int blendingFactor;
-      if( propertyValue.Get( blendingFactor ) )
-      {
-        BlendingFactor::Type srcFactorRgb;
-        BlendingFactor::Type destFactorRgb;
-        BlendingFactor::Type srcFactorAlpha;
-        BlendingFactor::Type destFactorAlpha;
-        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-        SetBlendFunc( srcFactorRgb,
-                      destFactorRgb,
-                      srcFactorAlpha,
-                      static_cast<BlendingFactor::Type>( blendingFactor ) );
-      }
-      break;
-    }
-    case Dali::Material::Property::BLEND_COLOR:
-    {
-      Vector4 blendColor;
-      if( propertyValue.Get( blendColor ) )
-      {
-        SetBlendColor( blendColor );
-      }
-      break;
-    }
-  }
 }
 
 void Material::SetSceneGraphProperty( Property::Index index,
@@ -486,76 +252,6 @@ void Material::SetSceneGraphProperty( Property::Index index,
 Property::Value Material::GetDefaultProperty( Property::Index index ) const
 {
   Property::Value value;
-
-  switch( index )
-  {
-    case Dali::Material::Property::FACE_CULLING_MODE:
-    {
-      value = mFaceCullingMode;
-      break;
-    }
-    case Dali::Material::Property::BLENDING_MODE:
-    {
-      value = mBlendingMode;
-      break;
-    }
-    case Dali::Material::Property::BLEND_EQUATION_RGB:
-    {
-      value = static_cast<int>( mBlendingOptions.GetBlendEquationRgb() );
-      break;
-    }
-    case Dali::Material::Property::BLEND_EQUATION_ALPHA:
-    {
-      value = static_cast<int>( mBlendingOptions.GetBlendEquationAlpha() );
-      break;
-    }
-    case Dali::Material::Property::BLENDING_SRC_FACTOR_RGB:
-    {
-      BlendingFactor::Type srcFactorRgb;
-      BlendingFactor::Type destFactorRgb;
-      BlendingFactor::Type srcFactorAlpha;
-      BlendingFactor::Type destFactorAlpha;
-      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-      value = static_cast<int>( srcFactorRgb );
-      break;
-    }
-    case Dali::Material::Property::BLENDING_DEST_FACTOR_RGB:
-    {
-      BlendingFactor::Type srcFactorRgb;
-      BlendingFactor::Type destFactorRgb;
-      BlendingFactor::Type srcFactorAlpha;
-      BlendingFactor::Type destFactorAlpha;
-      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-      value = static_cast<int>( destFactorRgb );
-      break;
-    }
-    case Dali::Material::Property::BLENDING_SRC_FACTOR_ALPHA:
-    {
-      BlendingFactor::Type srcFactorRgb;
-      BlendingFactor::Type destFactorRgb;
-      BlendingFactor::Type srcFactorAlpha;
-      BlendingFactor::Type destFactorAlpha;
-      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-      value = static_cast<int>( srcFactorAlpha );
-      break;
-    }
-    case Dali::Material::Property::BLENDING_DEST_FACTOR_ALPHA:
-    {
-      BlendingFactor::Type srcFactorRgb;
-      BlendingFactor::Type destFactorRgb;
-      BlendingFactor::Type srcFactorAlpha;
-      BlendingFactor::Type destFactorAlpha;
-      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
-      value = static_cast<int>( destFactorAlpha );
-      break;
-    }
-    case Dali::Material::Property::BLEND_COLOR:
-    {
-      value = mBlendColor;
-      break;
-    }
-  }
-
   return value;
 }
 
@@ -625,10 +321,6 @@ Material::Material()
 : mSceneObject( NULL ),
   mShader( NULL ),
   mTextures(),
-  mFaceCullingMode( Dali::Material::NONE ),
-  mBlendingMode( Dali::BlendingMode::AUTO ),
-  mBlendingOptions(), // initialises to defaults
-  mBlendColor( NULL ),
   mOnStage( false )
 {
 }
@@ -646,7 +338,6 @@ void Material::Initialize()
 
 Material::~Material()
 {
-  delete mBlendColor;
   if( EventThreadServices::IsCoreRunning() )
   {
     EventThreadServices& eventThreadServices = GetEventThreadServices();
index 61162d6..c2d0c7f 100644 (file)
@@ -25,7 +25,6 @@
 #include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
 #include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
 #include <dali/devel-api/rendering/material.h> // Dali::Material
-#include <dali/internal/common/blending-options.h>
 #include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
 #include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
 #include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
@@ -119,69 +118,7 @@ public:
    */
   size_t GetNumberOfTextures() const;
 
-  /**
-   * @copydoc Dali::Material::SetFaceCullingMode()
-   */
-  void SetFaceCullingMode( Dali::Material::FaceCullingMode cullingMode );
-
-  /**
-   * @copydoc Dali::Material::GetFaceCullingMode()
-   */
-  Dali::Material::FaceCullingMode GetFaceCullingMode();
-
-  /**
-   * @copydoc Dali::Material::SetBlendMode()
-   */
-  void SetBlendMode( BlendingMode::Type mode );
-
-  /**
-   * @copydoc Dali::Material::GetBlendMode()
-   */
-  BlendingMode::Type GetBlendMode() const;
-
-  /**
-   * @copydoc Dali::Material::SetBlendFunc()
-   */
-  void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
-
-  /**
-   * @copydoc Dali::Material::SetBlendFunc()
-   */
-  void SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
-                     BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
-
-  /**
-   * @copydoc Dali::Material::GetBlendFunc()
-   */
-  void GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
-                     BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
-
-  /**
-   * @copydoc Dali::Material::SetBlendEquation()
-   */
-  void SetBlendEquation( BlendingEquation::Type equationRgba );
-
-  /**
-   * @copydoc Dali::Material::SetBlendEquation()
-   */
-  void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
-
-  /**
-   * @copydoc Dali::Material::GetBlendEquation()
-   */
-  void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
-
-  /**
-   * @copydoc Dali::Material::SetBlendColor()
-   */
-  void SetBlendColor( const Vector4& color );
-
-  /**
-   * @copydoc Dali::Material::GetBlendColor()
-   */
-  Vector4 GetBlendColor() const;
-
-  /**
+ /**
    * @brief Get the material scene object
    *
    * @return the material scene object
@@ -330,10 +267,6 @@ private: // Data
   IntrusivePtr<Shader> mShader; ///< Connector that holds the shader used by this material
   std::vector<Material::Texture> mTextures; ///<Vector of textures used by this material
 
-  Dali::Material::FaceCullingMode mFaceCullingMode; ///< Local copy of face culling mode
-  BlendingMode::Type mBlendingMode;                 ///< Local copy of blending mode
-  BlendingOptions mBlendingOptions;                 ///< Local copy of blending options bitmask
-  Vector4* mBlendColor;                             ///< Local copy of blend color, pointer only as its rarely used
   bool mOnStage;
 
 };
index cb7073a..9e5567c 100644 (file)
@@ -36,10 +36,20 @@ namespace
 {
 
 /**
- *            |name          |type     |writable|animatable|constraint-input|enum for index-checking|
+ *            |name                              |type     |writable|animatable|constraint-input|enum for index-checking|
  */
 DALI_PROPERTY_TABLE_BEGIN
-DALI_PROPERTY( "depthIndex",  INTEGER, true, false, false, Dali::Renderer::Property::DEPTH_INDEX )
+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( "blendingMode",                    INTEGER,   true, false,  false, Dali::Renderer::Property::BLENDING_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( "sourceBlendFactorRgb",            INTEGER,   true, false,  false, Dali::Renderer::Property::BLENDING_SRC_FACTOR_RGB )
+DALI_PROPERTY( "destinationBlendFactorRgb",       INTEGER,   true, false,  false, Dali::Renderer::Property::BLENDING_DEST_FACTOR_RGB )
+DALI_PROPERTY( "sourceBlendFactorAlpha",          INTEGER,   true, false,  false, Dali::Renderer::Property::BLENDING_SRC_FACTOR_ALPHA )
+DALI_PROPERTY( "destinationBlendFactorAlpha",     INTEGER,   true, false,  false, Dali::Renderer::Property::BLENDING_DEST_FACTOR_ALPHA )
+DALI_PROPERTY( "blendingColor",                   VECTOR4,   true, false,  false, Dali::Renderer::Property::BLENDING_COLOR )
+DALI_PROPERTY( "blendPreMultipliedAlpha",         BOOLEAN,   true, false,  false, Dali::Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA )
 DALI_PROPERTY_TABLE_END( DEFAULT_OBJECT_PROPERTY_START_INDEX )
 
 const ObjectImplHelper<DEFAULT_PROPERTY_COUNT> RENDERER_IMPL = { DEFAULT_PROPERTY_DETAILS };
@@ -99,6 +109,123 @@ int Renderer::GetDepthIndex() const
   return mDepthIndex;
 }
 
+void Renderer::SetFaceCullingMode( Dali::Renderer::FaceCullingMode cullingMode )
+{
+  if( mFaceCullingMode != cullingMode )
+  {
+    mFaceCullingMode = cullingMode;
+
+    SetFaceCullingModeMessage( GetEventThreadServices(), *mSceneObject, mFaceCullingMode );
+  }
+}
+
+Dali::Renderer::FaceCullingMode Renderer::GetFaceCullingMode()
+{
+  return mFaceCullingMode;
+}
+
+void Renderer::SetBlendMode( BlendingMode::Type mode )
+{
+  if( mBlendingMode != mode )
+  {
+    mBlendingMode = mode;
+
+    SetBlendingModeMessage( GetEventThreadServices(), *mSceneObject, mBlendingMode );
+  }
+}
+
+BlendingMode::Type Renderer::GetBlendMode() const
+{
+  return mBlendingMode;
+}
+
+void Renderer::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
+{
+  mBlendingOptions.SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
+  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
+}
+
+void Renderer::SetBlendFunc( BlendingFactor::Type srcFactorRgb,
+                             BlendingFactor::Type destFactorRgb,
+                             BlendingFactor::Type srcFactorAlpha,
+                             BlendingFactor::Type destFactorAlpha )
+{
+  mBlendingOptions.SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
+}
+
+void Renderer::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,
+                             BlendingFactor::Type& destFactorRgb,
+                             BlendingFactor::Type& srcFactorAlpha,
+                             BlendingFactor::Type& destFactorAlpha ) const
+{
+  srcFactorRgb    = mBlendingOptions.GetBlendSrcFactorRgb();
+  destFactorRgb   = mBlendingOptions.GetBlendDestFactorRgb();
+  srcFactorAlpha  = mBlendingOptions.GetBlendSrcFactorAlpha();
+  destFactorAlpha = mBlendingOptions.GetBlendDestFactorAlpha();
+}
+
+void Renderer::SetBlendEquation( BlendingEquation::Type equationRgba )
+{
+  mBlendingOptions.SetBlendEquation( equationRgba, equationRgba );
+  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
+}
+
+void Renderer::SetBlendEquation( BlendingEquation::Type equationRgb,
+                                 BlendingEquation::Type equationAlpha )
+{
+  mBlendingOptions.SetBlendEquation( equationRgb, equationAlpha );
+  SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
+}
+
+void Renderer::GetBlendEquation( BlendingEquation::Type& equationRgb,
+                                 BlendingEquation::Type& equationAlpha ) const
+{
+  // These are not animatable, the cached values are up-to-date.
+  equationRgb   = mBlendingOptions.GetBlendEquationRgb();
+  equationAlpha = mBlendingOptions.GetBlendEquationAlpha();
+}
+
+void Renderer::SetBlendColor( const Vector4& color )
+{
+  if( !mBlendColor )
+  {
+    mBlendColor = new Vector4();
+  }
+  if( *mBlendColor != color )
+  {
+    *mBlendColor = color;
+    SetBlendColorMessage( GetEventThreadServices(), *mSceneObject, *mBlendColor );
+  }
+}
+
+Vector4 Renderer::GetBlendColor() const
+{
+  if( mBlendColor )
+  {
+    return *mBlendColor;
+  }
+  return Color::TRANSPARENT; // GL default
+}
+
+void Renderer::EnablePreMultipliedAlpha( bool preMultipled )
+{
+  if(  mPremultipledAlphaEnabled != preMultipled )
+  {
+    if( preMultipled )
+    {
+      SetBlendFunc( BlendingFactor::ONE, BlendingFactor::ONE_MINUS_SRC_ALPHA, BlendingFactor::ONE, BlendingFactor::ONE );
+    }
+    mPremultipledAlphaEnabled = preMultipled;
+    SetEnablePreMultipliedAlphaMessage( GetEventThreadServices(), *mSceneObject, mPremultipledAlphaEnabled );
+  }
+}
+
+bool Renderer::IsPreMultipliedAlphaEnabled() const
+{
+  return mPremultipledAlphaEnabled;
+}
+
 SceneGraph::Renderer* Renderer::GetRendererSceneObject()
 {
   return mSceneObject;
@@ -152,8 +279,134 @@ void Renderer::SetDefaultProperty( Property::Index index,
     case Dali::Renderer::Property::DEPTH_INDEX:
     {
       SetDepthIndex( propertyValue.Get<int>() );
+      break;
+    }
+    case Dali::Renderer::Property::FACE_CULLING_MODE:
+    {
+      int faceCullingMode;
+      if( propertyValue.Get( faceCullingMode ) )
+      {
+        SetFaceCullingMode( Dali::Renderer::FaceCullingMode( faceCullingMode ) );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_MODE:
+    {
+      int blendingMode;
+      if( propertyValue.Get( blendingMode ) )
+      {
+        SetBlendMode( BlendingMode::Type( blendingMode ) );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLEND_EQUATION_RGB:
+    {
+      int blendingEquation;
+      if( propertyValue.Get( blendingEquation ) )
+      {
+        BlendingEquation::Type alphaEquation = mBlendingOptions.GetBlendEquationAlpha();
+        mBlendingOptions.SetBlendEquation( static_cast<BlendingEquation::Type>( blendingEquation ), alphaEquation );
+        SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLEND_EQUATION_ALPHA:
+    {
+      int blendingEquation;
+      if( propertyValue.Get( blendingEquation ) )
+      {
+        BlendingEquation::Type rgbEquation = mBlendingOptions.GetBlendEquationRgb();
+        mBlendingOptions.SetBlendEquation( rgbEquation, static_cast<BlendingEquation::Type>( blendingEquation ) );
+        SetBlendingOptionsMessage( GetEventThreadServices(), *mSceneObject, mBlendingOptions.GetBitmask() );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_SRC_FACTOR_RGB:
+    {
+      int blendingFactor;
+      if( propertyValue.Get( blendingFactor ) )
+      {
+        BlendingFactor::Type srcFactorRgb;
+        BlendingFactor::Type destFactorRgb;
+        BlendingFactor::Type srcFactorAlpha;
+        BlendingFactor::Type destFactorAlpha;
+        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+        SetBlendFunc( static_cast<BlendingFactor::Type>( blendingFactor ),
+            destFactorRgb,
+            srcFactorAlpha,
+            destFactorAlpha );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_DEST_FACTOR_RGB:
+    {
+      int blendingFactor;
+      if( propertyValue.Get( blendingFactor ) )
+      {
+        BlendingFactor::Type srcFactorRgb;
+        BlendingFactor::Type destFactorRgb;
+        BlendingFactor::Type srcFactorAlpha;
+        BlendingFactor::Type destFactorAlpha;
+        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+        SetBlendFunc( srcFactorRgb,
+            static_cast<BlendingFactor::Type>( blendingFactor ),
+            srcFactorAlpha,
+            destFactorAlpha );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_SRC_FACTOR_ALPHA:
+    {
+      int blendingFactor;
+      if( propertyValue.Get( blendingFactor ) )
+      {
+        BlendingFactor::Type srcFactorRgb;
+        BlendingFactor::Type destFactorRgb;
+        BlendingFactor::Type srcFactorAlpha;
+        BlendingFactor::Type destFactorAlpha;
+        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+        SetBlendFunc( srcFactorRgb,
+            destFactorRgb,
+            static_cast<BlendingFactor::Type>( blendingFactor ),
+            destFactorAlpha );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_DEST_FACTOR_ALPHA:
+    {
+      int blendingFactor;
+      if( propertyValue.Get( blendingFactor ) )
+      {
+        BlendingFactor::Type srcFactorRgb;
+        BlendingFactor::Type destFactorRgb;
+        BlendingFactor::Type srcFactorAlpha;
+        BlendingFactor::Type destFactorAlpha;
+        GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+        SetBlendFunc( srcFactorRgb,
+            destFactorRgb,
+            srcFactorAlpha,
+            static_cast<BlendingFactor::Type>( blendingFactor ) );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_COLOR:
+    {
+      Vector4 blendColor;
+      if( propertyValue.Get( blendColor ) )
+      {
+        SetBlendColor( blendColor );
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA:
+    {
+      bool preMultipled;
+      if( propertyValue.Get( preMultipled ) )
+      {
+        EnablePreMultipliedAlpha( preMultipled );
+      }
+      break;
     }
-    break;
   }
 }
 
@@ -173,8 +426,85 @@ Property::Value Renderer::GetDefaultProperty( Property::Index index ) const
     case Dali::Renderer::Property::DEPTH_INDEX:
     {
       value = GetDepthIndex();
+      break;
+    }
+    case Dali::Renderer::Property::FACE_CULLING_MODE:
+    {
+      value = mFaceCullingMode;
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_MODE:
+    {
+      value = mBlendingMode;
+      break;
+    }
+    case Dali::Renderer::Property::BLEND_EQUATION_RGB:
+    {
+      value = static_cast<int>( mBlendingOptions.GetBlendEquationRgb() );
+      break;
+    }
+    case Dali::Renderer::Property::BLEND_EQUATION_ALPHA:
+    {
+      value = static_cast<int>( mBlendingOptions.GetBlendEquationAlpha() );
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_SRC_FACTOR_RGB:
+    {
+      BlendingFactor::Type srcFactorRgb;
+      BlendingFactor::Type destFactorRgb;
+      BlendingFactor::Type srcFactorAlpha;
+      BlendingFactor::Type destFactorAlpha;
+      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+      value = static_cast<int>( srcFactorRgb );
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_DEST_FACTOR_RGB:
+    {
+      BlendingFactor::Type srcFactorRgb;
+      BlendingFactor::Type destFactorRgb;
+      BlendingFactor::Type srcFactorAlpha;
+      BlendingFactor::Type destFactorAlpha;
+      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+      value = static_cast<int>( destFactorRgb );
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_SRC_FACTOR_ALPHA:
+    {
+      BlendingFactor::Type srcFactorRgb;
+      BlendingFactor::Type destFactorRgb;
+      BlendingFactor::Type srcFactorAlpha;
+      BlendingFactor::Type destFactorAlpha;
+      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+      value = static_cast<int>( srcFactorAlpha );
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_DEST_FACTOR_ALPHA:
+    {
+      BlendingFactor::Type srcFactorRgb;
+      BlendingFactor::Type destFactorRgb;
+      BlendingFactor::Type srcFactorAlpha;
+      BlendingFactor::Type destFactorAlpha;
+      GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+      value = static_cast<int>( destFactorAlpha );
+      break;
+    }
+    case Dali::Renderer::Property::BLENDING_COLOR:
+    {
+      if( mBlendColor )
+      {
+        value = *mBlendColor;
+      }
+      else
+      {
+        value = Color::TRANSPARENT;
+      }
+      break;
+    }
+    case Dali::Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA:
+    {
+      value = IsPreMultipliedAlphaEnabled();
+      break;
     }
-    break;
   }
   return value;
 }
@@ -257,8 +587,13 @@ void Renderer::Disconnect()
 
 Renderer::Renderer()
 : mSceneObject(NULL),
+  mBlendColor( NULL ),
   mDepthIndex(0),
-  mOnStageCount(0)
+  mOnStageCount(0),
+  mFaceCullingMode(Dali::Renderer::NONE),
+  mBlendingMode( Dali::BlendingMode::AUTO ),
+  mBlendingOptions(),
+  mPremultipledAlphaEnabled( false )
 {
 }
 
index db1e13d..6708129 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/common/dali-common.h> // DALI_ASSERT_ALWAYS
 #include <dali/public-api/common/intrusive-ptr.h> // Dali::IntrusivePtr
 #include <dali/devel-api/rendering/renderer.h> // Dali::Renderer
+#include <dali/internal/common/blending-options.h>
 #include <dali/internal/event/common/connectable.h> // Dali::Internal::Connectable
 #include <dali/internal/event/common/object-connector.h> // Dali::Internal::ObjectConnector
 #include <dali/internal/event/common/object-impl.h> // Dali::Internal::Object
@@ -85,6 +86,82 @@ public:
   int GetDepthIndex() const;
 
   /**
+    * @copydoc Dali::Renderer::SetFaceCullingMode()
+    */
+   void SetFaceCullingMode( Dali::Renderer::FaceCullingMode cullingMode );
+
+   /**
+    * @copydoc Dali::Renderer::GetFaceCullingMode()
+    */
+   Dali::Renderer::FaceCullingMode GetFaceCullingMode();
+
+   /**
+    * @copydoc Dali::Renderer::SetBlendMode()
+    */
+   void SetBlendMode( BlendingMode::Type mode );
+
+   /**
+    * @copydoc Dali::Renderer::GetBlendMode()
+    */
+   BlendingMode::Type GetBlendMode() const;
+
+   /**
+    * @copydoc Dali::Renderer::SetBlendFunc()
+    */
+   void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
+
+   /**
+    * @copydoc Dali::Renderer::SetBlendFunc()
+    */
+   void SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
+                      BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
+
+   /**
+    * @copydoc Dali::Renderer::GetBlendFunc()
+    */
+   void GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
+                      BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
+
+   /**
+    * @copydoc Dali::Renderer::SetBlendEquation()
+    */
+   void SetBlendEquation( BlendingEquation::Type equationRgba );
+
+   /**
+    * @copydoc Dali::Renderer::SetBlendEquation()
+    */
+   void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
+
+   /**
+    * @copydoc Dali::Renderer::GetBlendEquation()
+    */
+   void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
+
+   /**
+    * @copydoc Dali::Renderer::SetBlendColor()
+    */
+   void SetBlendColor( const Vector4& color );
+
+   /**
+    * @copydoc Dali::Renderer::GetBlendColor()
+    */
+   Vector4 GetBlendColor() const;
+
+   /**
+    * @brief Set whether the Pre-multiplied Alpha Blending is required
+    *
+    * @param[in] preMultipled whether alpha is pre-multiplied.
+    */
+   void EnablePreMultipliedAlpha( bool preMultipled );
+
+   /**
+    * @brief Query whether alpha is pre-multiplied.
+    *
+    * @return True is alpha is pre-multiplied, false otherwise.
+    */
+   bool IsPreMultipliedAlphaEnabled() const;
+
+  /**
    * @brief Get the scene graph object ( the node attachment )
    *
    * @return the scene object
@@ -206,10 +283,18 @@ private: // unimplemented methods
 
 private: // data
   SceneGraph::Renderer* mSceneObject;
+  Vector4* mBlendColor;                         ///< Local copy of blend color, pointer only as its rarely used
   ObjectConnector<Geometry> mGeometryConnector; ///< Connector that holds the geometry used by this renderer
   ObjectConnector<Material> mMaterialConnector; ///< Connector that holds the material used by this renderer
+
   int mDepthIndex;
   int mOnStageCount;
+
+  Dali::Renderer::FaceCullingMode mFaceCullingMode; ///< Local copy of face culling mode
+  BlendingMode::Type mBlendingMode;                 ///< Local copy of blending mode
+  BlendingOptions mBlendingOptions;                 ///< Local copy of blending options bitmask
+  bool mPremultipledAlphaEnabled;                   ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
+
 };
 
 } // namespace Internal
diff --git a/dali/internal/render/data-providers/material-data-provider.h b/dali/internal/render/data-providers/material-data-provider.h
deleted file mode 100644 (file)
index 2a55133..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
-#define DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
-/*
- * Copyright (c) 2015 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <dali/internal/common/buffer-index.h>
-#include <dali/devel-api/rendering/material.h>
-#include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/actors/blending.h>
-
-namespace Dali
-{
-namespace Internal
-{
-struct BlendingOptions;
-
-namespace SceneGraph
-{
-
-/**
- * Interface to provide data of the material to the renderer.
- * This interface must not be used to pass object pointers.
- */
-class MaterialDataProvider
-{
-public:
-  /**
-   * Construtor
-   */
-  MaterialDataProvider()
-  {
-  }
-
-  /**
-   * Get the blend color
-   * @return blend color of NULL if blend color is not set
-   */
-  virtual Vector4* GetBlendColor() const = 0;
-
-  /**
-   * Get the blending options
-   * @return the blending options
-   */
-  virtual const BlendingOptions& GetBlendingOptions() const = 0;
-
-  /**
-   * Get the cull face mode
-   * @return the cull face mode
-   */
-  virtual Dali::Material::FaceCullingMode GetFaceCullingMode() const = 0;
-
-protected:
-  /**
-   * Destructor. No deletion through this interface
-   */
-  virtual ~MaterialDataProvider()
-  {
-  }
-};
-
-} // namespace SceneGraph
-
-} // namespace Internal
-
-} // namespace Dali
-
-#endif // DALI_INTERNAL_SCENE_GRAPH_MATERIAL_DATA_PROVIDER_H
index b228bb5..bd74029 100644 (file)
@@ -25,8 +25,7 @@ namespace SceneGraph
 {
 
 RenderDataProvider::RenderDataProvider()
-: mMaterialDataProvider( NULL ),
-  mUniformMapDataProvider( NULL ),
+: mUniformMapDataProvider( NULL ),
   mShader( NULL )
 {
 }
@@ -35,15 +34,6 @@ RenderDataProvider::~RenderDataProvider()
 {
 }
 
-void RenderDataProvider::SetMaterial( const MaterialDataProvider& materialDataProvider )
-{
-  mMaterialDataProvider = &materialDataProvider;
-}
-
-const MaterialDataProvider& RenderDataProvider::GetMaterial() const
-{
-  return *mMaterialDataProvider;
-}
 
 void RenderDataProvider::SetUniformMap(const UniformMapDataProvider& uniformMapDataProvider)
 {
index 2d628ab..ef8a0ed 100644 (file)
  *
  */
 
-#include <dali/internal/render/data-providers/material-data-provider.h>
 #include <dali/internal/render/data-providers/node-data-provider.h>
 #include <dali/internal/render/data-providers/property-buffer-data-provider.h>
 #include <dali/internal/render/data-providers/uniform-map-data-provider.h>
 #include <dali/internal/render/renderers/render-texture.h>
+#include <dali/devel-api/rendering/renderer.h>
+
 namespace Dali
 {
 namespace Internal
 {
+
+struct BlendingOptions;
+
 namespace SceneGraph
 {
 class PropertyBuffer;
@@ -62,18 +66,6 @@ public:
 public:
 
   /**
-   * Set the material data provider
-   * @param[in] materialDataProvider The material data provider
-   */
-  void SetMaterial( const MaterialDataProvider& materialDataProvider );
-
-  /**
-   * Get the material data provider
-   * @return the material data provider
-   */
-  const MaterialDataProvider& GetMaterial() const;
-
-  /**
    * Set the uniform map data provider
    * @param[in] uniformMapDataProvider The uniform map data provider
    */
@@ -103,12 +95,12 @@ public:
   Textures& GetTextures();
 
 private:
-  const MaterialDataProvider*   mMaterialDataProvider;
-  const UniformMapDataProvider* mUniformMapDataProvider;
-  Shader*                       mShader;
-  Textures                      mTextures;
 
-// Give Renderer access to our private data to reduce copying vectors on construction.
+  const UniformMapDataProvider*       mUniformMapDataProvider;
+  Shader*                             mShader;
+  Textures                            mTextures;
+
+  // Give Renderer access to our private data to reduce copying vectors on construction.
   friend class Renderer;
 };
 
index 65f8cc6..b253b4b 100644 (file)
@@ -93,7 +93,7 @@ Context::Context(Integration::GlAbstraction& glAbstraction)
   mBlendEquationSeparateModeAlpha( GL_FUNC_ADD ),
   mMaxTextureSize(0),
   mClearColor(Color::WHITE),    // initial color, never used until it's been set by the user
-  mCullFaceMode( Dali::Material::NONE ),
+  mCullFaceMode( Dali::Renderer::NONE ),
   mViewPort( 0, 0, 0, 0 )
 {
 }
@@ -227,7 +227,7 @@ void Context::InitializeGlState()
   mBlendEquationSeparateModeRGB = GL_FUNC_ADD;
   mBlendEquationSeparateModeAlpha = GL_FUNC_ADD;
 
-  mCullFaceMode = Dali::Material::NONE; //By default cullface is disabled, front face is set to CCW and cull face is set to back
+  mCullFaceMode = Dali::Renderer::NONE; //By default cullface is disabled, front face is set to CCW and cull face is set to back
 
   // get maximum texture size
   mGlAbstraction.GetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
index 6b456dd..16782e3 100644 (file)
@@ -26,7 +26,7 @@
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/gl-abstraction.h>
 #include <dali/integration-api/gl-defines.h>
-#include <dali/devel-api/rendering/material.h>
+#include <dali/devel-api/rendering/renderer.h>
 #include <dali/internal/render/common/performance-monitor.h>
 #include <dali/internal/render/gl-resources/texture-units.h>
 #include <dali/internal/render/gl-resources/frame-buffer-state-cache.h>
@@ -537,7 +537,7 @@ public:
    * enables GL_CULL_FACE if in any of the face culling modes
    * otherwise disables GL_CULL_FACE
    */
-  void CullFace( Dali::Material::FaceCullingMode mode )
+  void CullFace( Dali::Renderer::FaceCullingMode mode )
   {
     // Avoid unnecessary calls to gl
     if(mCullFaceMode != mode)
@@ -545,14 +545,14 @@ public:
       mCullFaceMode = mode;
       switch(mode)
       {
-        case Dali::Material::NONE:
+        case Dali::Renderer::NONE:
         {
           LOG_GL("Disable GL_CULL_FACE\n");
           CHECK_GL( mGlAbstraction, mGlAbstraction.Disable(GL_CULL_FACE) );
           break;
         }
 
-        case Dali::Material::CULL_FRONT:
+        case Dali::Renderer::CULL_FRONT:
         {
           LOG_GL("Enable GL_CULL_FACE\n");
           CHECK_GL( mGlAbstraction, mGlAbstraction.Enable(GL_CULL_FACE) );
@@ -561,7 +561,7 @@ public:
           break;
         }
 
-        case Dali::Material::CULL_BACK:
+        case Dali::Renderer::CULL_BACK:
         {
           LOG_GL("Enable GL_CULL_FACE\n");
           CHECK_GL( mGlAbstraction, mGlAbstraction.Enable(GL_CULL_FACE) );
@@ -570,7 +570,7 @@ public:
           break;
         }
 
-        case Dali::Material::CULL_BACK_AND_FRONT:
+        case Dali::Renderer::CULL_BACK_AND_FRONT:
         {
           LOG_GL("Enable GL_CULL_FACE\n");
           CHECK_GL( mGlAbstraction, mGlAbstraction.Enable(GL_CULL_FACE) );
@@ -1725,7 +1725,7 @@ private: // Data
   Vector4 mClearColor;        ///< clear color
 
   // Face culling mode
-  Dali::Material::FaceCullingMode mCullFaceMode;
+  Dali::Renderer::FaceCullingMode mCullFaceMode;
 
   // cached viewport size
   Rect< int > mViewPort;
index 2c934cd..cdd8752 100644 (file)
@@ -110,13 +110,21 @@ namespace Render
 {
 
 Renderer* Renderer::New( SceneGraph::RenderDataProvider* dataProvider,
-                         SceneGraph::RenderGeometry* renderGeometry )
+                         SceneGraph::RenderGeometry* renderGeometry,
+                         unsigned int blendingBitmask,
+                         const Vector4* blendColor,
+                         Dali::Renderer::FaceCullingMode faceCullingMode,
+                         bool preMultipliedAlphaEnabled )
 {
-  return new Renderer( dataProvider, renderGeometry);
+  return new Renderer( dataProvider, renderGeometry, blendingBitmask, blendColor, faceCullingMode, preMultipliedAlphaEnabled );
 }
 
 Renderer::Renderer( SceneGraph::RenderDataProvider* dataProvider,
-                    SceneGraph::RenderGeometry* renderGeometry )
+                    SceneGraph::RenderGeometry* renderGeometry,
+                    unsigned int blendingBitmask,
+                    const Vector4* blendColor,
+                    Dali::Renderer::FaceCullingMode faceCullingMode,
+                    bool preMultipliedAlphaEnabled)
 : mRenderDataProvider( dataProvider ),
   mContext(NULL),
   mTextureCache( NULL ),
@@ -124,10 +132,21 @@ Renderer::Renderer( SceneGraph::RenderDataProvider* dataProvider,
   mRenderGeometry( renderGeometry ),
   mUniformIndexMap(),
   mAttributesLocation(),
+  mBlendingOptions(),
+  mFaceCullingMode( faceCullingMode  ),
   mSamplerBitfield( ImageSampler::PackBitfield( FilterMode::DEFAULT, FilterMode::DEFAULT ) ),
   mUpdateAttributesLocation( true ),
-  mCullFaceMode( Dali::Material::NONE  )
+  mPremultipledAlphaEnabled( preMultipliedAlphaEnabled )
 {
+  if(  blendingBitmask != 0u )
+  {
+    mBlendingOptions.SetBitmask( blendingBitmask );
+  }
+
+  if( blendColor )
+  {
+    mBlendingOptions.SetBlendColor( *blendColor );
+  }
 }
 
 void Renderer::Initialize( Context& context, SceneGraph::TextureCache& textureCache, Render::UniformNameCache& uniformNameCache )
@@ -166,10 +185,8 @@ void Renderer::SetBlending( Context& context, bool blend )
   context.SetBlend( blend );
   if( blend )
   {
-    const SceneGraph::MaterialDataProvider& material = mRenderDataProvider->GetMaterial();
-
     // Blend color is optional and rarely used
-    Vector4* blendColor = material.GetBlendColor();
+    const Vector4* blendColor = mBlendingOptions.GetBlendColor();
     if( blendColor )
     {
       context.SetCustomBlendColor( *blendColor );
@@ -179,16 +196,15 @@ void Renderer::SetBlending( Context& context, bool blend )
       context.SetDefaultBlendColor();
     }
 
-    const BlendingOptions& blending = material.GetBlendingOptions();
     // Set blend source & destination factors
-    context.BlendFuncSeparate( blending.GetBlendSrcFactorRgb(),
-                               blending.GetBlendDestFactorRgb(),
-                               blending.GetBlendSrcFactorAlpha(),
-                               blending.GetBlendDestFactorAlpha() );
+    context.BlendFuncSeparate( mBlendingOptions.GetBlendSrcFactorRgb(),
+                               mBlendingOptions.GetBlendDestFactorRgb(),
+                               mBlendingOptions.GetBlendSrcFactorAlpha(),
+                               mBlendingOptions.GetBlendDestFactorAlpha() );
 
     // Set blend equations
-    context.BlendEquationSeparate( blending.GetBlendEquationRgb(),
-                                   blending.GetBlendEquationAlpha() );
+    context.BlendEquationSeparate( mBlendingOptions.GetBlendEquationRgb(),
+                                   mBlendingOptions.GetBlendEquationAlpha() );
   }
 }
 
@@ -386,10 +402,24 @@ void Renderer::BindTextures( SceneGraph::TextureCache& textureCache, Program& pr
   }
 }
 
-void Renderer::SetCullFace( Dali::Material::FaceCullingMode mode )
+void Renderer::SetFaceCullingMode( Dali::Renderer::FaceCullingMode mode )
+{
+  mFaceCullingMode =  mode;
+}
+
+void Renderer::SetBlendingBitMask( unsigned int bitmask )
+{
+  mBlendingOptions.SetBitmask( bitmask );
+}
+
+void Renderer::SetBlendColor( const Vector4* color )
+{
+  mBlendingOptions.SetBlendColor( *color );
+}
+
+void Renderer::EnablePreMultipliedAlpha( bool enable )
 {
-  DALI_ASSERT_DEBUG( mode >= Dali::Material::NONE && mode <= Dali::Material::CULL_BACK_AND_FRONT );
-  mCullFaceMode = mode;
+  mPremultipledAlphaEnabled = enable;
 }
 
 void Renderer::SetSampler( unsigned int samplerBitfield )
@@ -422,7 +452,7 @@ void Renderer::Render( Context& context,
   }
 
   //Set cull face  mode
-  context.CullFace( mRenderDataProvider->GetMaterial().GetFaceCullingMode() );
+  context.CullFace( mFaceCullingMode );
 
   //Set blending mode
   SetBlending( context, blend );
@@ -438,7 +468,14 @@ void Renderer::Render( Context& context,
   if( Program::UNIFORM_UNKNOWN != loc )
   {
     const Vector4& color = node.GetRenderColor( bufferIndex );
-    program->SetUniform4f( loc, color.r, color.g, color.b, color.a );
+    if( mPremultipledAlphaEnabled )
+    {
+      program->SetUniform4f( loc, color.r*color.a, color.g*color.a, color.b*color.a, color.a );
+    }
+    else
+    {
+      program->SetUniform4f( loc, color.r, color.g, color.b, color.a );
+    }
   }
 
   //Bind textures
index 6d83053..611ee9b 100644 (file)
@@ -76,15 +76,33 @@ public:
    * Create a new renderer instance
    * @param[in] dataProviders The data providers for the renderer
    * @param[in] renderGeometry The geometry for the renderer
+   * @param[in] blendingBitmask A bitmask of blending options.
+   * @param[in] blendColor The blend color to pass to GL
+   * @param[in] faceCullingMode The face-culling mode.
+   * @param[in] preMultipliedAlphaEnabled whether alpha is pre-multiplied.
    */
-  static Renderer* New( SceneGraph::RenderDataProvider* dataProviders, SceneGraph::RenderGeometry* renderGeometry );
+  static Renderer* New( SceneGraph::RenderDataProvider* dataProviders,
+                        SceneGraph::RenderGeometry* renderGeometry,
+                        unsigned int blendingBitmask,
+                        const Vector4* blendColor,
+                        Dali::Renderer::FaceCullingMode faceCullingMode,
+                        bool preMultipliedAlphaEnabled);
 
   /**
    * Constructor.
    * @param[in] dataProviders The data providers for the renderer
    * @param[in] renderGeometry The geometry for the renderer
+   * @param[in] blendingBitmask A bitmask of blending options.
+   * @param[in] blendColor The blend color to pass to GL
+   * @param[in] faceCullingMode The face-culling mode.
+   * @param[in] preMultipliedAlphaEnabled whether alpha is pre-multiplied.
    */
-  Renderer( SceneGraph::RenderDataProvider* dataProviders, SceneGraph::RenderGeometry* renderGeometry );
+  Renderer( SceneGraph::RenderDataProvider* dataProviders,
+            SceneGraph::RenderGeometry* renderGeometry,
+            unsigned int blendingBitmask,
+            const Vector4* blendColor,
+            Dali::Renderer::FaceCullingMode faceCullingMode,
+            bool preMultipliedAlphaEnabled);
 
   /**
    * Change the data providers of the renderer
@@ -115,7 +133,26 @@ public:
    * Set the face-culling mode.
    * @param[in] mode The face-culling mode.
    */
-  void SetCullFace( Dali::Material::FaceCullingMode mode );
+  void SetFaceCullingMode( Dali::Renderer::FaceCullingMode mode );
+
+  /**
+   * Set the bitmask for blending options
+   * @param[in] bitmask A bitmask of blending options.
+   */
+  void SetBlendingBitMask( unsigned int bitmask );
+
+  /**
+   * Set the blend color for blending options
+   * @param[in] blendColor The blend color to pass to GL
+   */
+  void SetBlendColor( const Vector4* color );
+
+  /**
+   * @brief Set whether the Pre-multiplied Alpha Blending is required
+   *
+   * @param[in] preMultipled whether alpha is pre-multiplied.
+   */
+  void EnablePreMultipliedAlpha( bool preMultipled );
 
   /**
    * Set the sampler used to render the set texture.
@@ -216,9 +253,12 @@ private:
 
   Vector<GLint> mAttributesLocation;
 
+  BlendingOptions                 mBlendingOptions; /// Blending options including blend color, blend func and blend equation
+  Dali::Renderer::FaceCullingMode mFaceCullingMode; /// Mode of face culling
+
   unsigned int mSamplerBitfield;                    ///< Sampler options used for texture filtering
   bool mUpdateAttributesLocation:1;                 ///< Indicates attribute locations have changed
-  Dali::Material::FaceCullingMode mCullFaceMode:2;  ///< cullface enum, 3 bits is enough
+  bool mPremultipledAlphaEnabled:1;      ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
 };
 
 } // namespace SceneGraph
index 388efba..0d83a46 100644 (file)
@@ -35,7 +35,6 @@ class RenderTracker;
 class RenderItem;
 class Shader;
 class RenderGeometry;
-class MaterialDataProvider;
 
 /**
  * Structure to store information for sorting the renderers.
index ee4b79b..f18a95e 100644 (file)
@@ -49,15 +49,10 @@ Material* Material::New()
 
 Material::Material()
 : mShader( NULL ),
-  mBlendColor( NULL ),
   mSamplers(),
   mTextureId(),
   mUniformName(),
   mConnectionObservers(),
-  mFaceCullingMode( Dali::Material::NONE ),
-  mBlendingMode( Dali::BlendingMode::AUTO ),
-  mBlendingOptions(), // initializes to defaults
-  mBlendPolicy( OPAQUE ),
   mResourcesReady( false ),
   mFinishedResourceAcquisition( false ),
   mMaterialChanged( true )
@@ -126,37 +121,9 @@ void Material::Prepare( const ResourceManager& resourceManager )
         }
       }
     }
-    mBlendPolicy = OPAQUE;
-    switch( mBlendingMode )
-    {
-      case BlendingMode::OFF:
-      {
-        mBlendPolicy = OPAQUE;
-        break;
-      }
-      case BlendingMode::ON:
-      {
-        mBlendPolicy = TRANSLUCENT;
-        break;
-      }
-      case BlendingMode::AUTO:
-      {
-        // @todo: Change hints for new SceneGraphShader:
-        // If shader hint OUTPUT_IS_OPAQUE is enabled, set policy to ALWAYS_OPAQUE
-        // If shader hint OUTPUT_IS_TRANSPARENT is enabled, set policy to ALWAYS_TRANSPARENT
-        // else test remainder, and set policy to either ALWAYS_TRANSPARENT or USE_ACTOR_COLOR
 
-        if( ( opaqueCount != textureCount ) ||
-            ( mShader && mShader->GeometryHintEnabled( Dali::ShaderEffect::HINT_BLENDING ) ) )
-        {
-          mBlendPolicy = Material::TRANSLUCENT;
-        }
-        else
-        {
-          mBlendPolicy = Material::USE_ACTOR_COLOR;
-        }
-      }
-    }
+    //  whether the textures or the shader require the opacity to be translucent
+    mIsTranslucent = ( opaqueCount != textureCount ) || ( mShader && mShader->GeometryHintEnabled( Dali::ShaderEffect::HINT_BLENDING ) );
 
     // ready for rendering when all textures are either successfully loaded or they are FBOs
     mResourcesReady = (completeCount + frameBufferCount >= textureCount);
@@ -188,51 +155,9 @@ Shader* Material::GetShader() const
   return mShader;
 }
 
-void Material::SetFaceCullingMode( unsigned int faceCullingMode )
-{
-  mFaceCullingMode = static_cast< Dali::Material::FaceCullingMode >( faceCullingMode );
-}
-
-void Material::SetBlendingMode( unsigned int blendingMode )
-{
-  mBlendingMode = static_cast< BlendingMode::Type >( blendingMode );
-}
-
-Material::BlendPolicy Material::GetBlendPolicy() const
-{
-  return mBlendPolicy;
-}
-
-void Material::SetBlendingOptions( unsigned int options )
-{
-  mBlendingOptions.SetBitmask( options );
-}
-
-void Material::SetBlendColor( const Vector4& blendColor )
-{
-  if( mBlendColor )
-  {
-    *mBlendColor = blendColor;
-  }
-  else
-  {
-    mBlendColor = new Vector4( blendColor );
-  }
-}
-
-Vector4* Material::GetBlendColor() const
-{
-  return mBlendColor;
-}
-
-const BlendingOptions& Material::GetBlendingOptions() const
-{
-  return mBlendingOptions;
-}
-
-Dali::Material::FaceCullingMode Material::GetFaceCullingMode() const
+bool Material::IsTranslucent() const
 {
-  return mFaceCullingMode;
+  return mIsTranslucent;
 }
 
 void Material::AddTexture( const std::string& name, ResourceId id, Render::Sampler* sampler )
index 01072db..0cc4721 100644 (file)
 // INTERNAL INCLUDES
 #include <dali/devel-api/rendering/material.h>
 #include <dali/internal/common/buffer-index.h>
-#include <dali/internal/common/blending-options.h>
 #include <dali/internal/event/common/event-thread-services.h>
 #include <dali/internal/update/common/animatable-property.h>
 #include <dali/internal/update/common/property-owner.h>
 #include <dali/internal/update/common/scene-graph-connection-change-propagator.h>
 #include <dali/internal/update/common/uniform-map.h>
-#include <dali/internal/render/data-providers/material-data-provider.h>
 #include <dali/internal/update/resources/resource-manager-declarations.h>
 
 namespace Dali
@@ -46,19 +44,9 @@ class Shader;
 class ConnectionObserver;
 class SceneController;
 
-class Material : public PropertyOwner, public MaterialDataProvider, public UniformMap::Observer, public ConnectionChangePropagator::Observer
+class Material : public PropertyOwner, public UniformMap::Observer, public ConnectionChangePropagator::Observer
 {
 public:
-  /**
-   * This enum defines the outputs of the PrepareRender step, and is used
-   * by the Renderer to determine final opacity.
-   */
-  enum BlendPolicy
-  {
-    OPAQUE,          ///< If the renderer should never use blending
-    TRANSLUCENT,     ///< If the renderer should always be use blending
-    USE_ACTOR_COLOR  ///< If the renderer should determine opacity using the actor color
-  };
 
   /**
    * Construct a new Material.
@@ -95,37 +83,6 @@ public:
   Shader* GetShader() const;
 
   /**
-   * Set the face culling mode
-   * @param[in] faceCullingMode to use
-   */
-  void SetFaceCullingMode( unsigned int faceCullingMode );
-
-  /**
-   * Set the blending mode
-   * @param[in] blendingMode to use
-   */
-  void SetBlendingMode( unsigned int blendingMode );
-
-  /**
-   * Return the blend policy ( a combination of all the different shader hints, color, samper and image properties ).
-   * This should only be called from the update thread
-   * @return The material's blend policy
-   */
-  BlendPolicy GetBlendPolicy() const;
-
-  /**
-   * Set the blending options. This should only be called from the update thread.
-   * @param[in] options A bitmask of blending options.
-   */
-  void SetBlendingOptions( unsigned int options );
-
-  /**
-   * Set the blend color for blending operation
-   * @param blendColor to pass to GL
-   */
-  void SetBlendColor( const Vector4& blendColor );
-
-  /**
    * Adds a new texture to be used by the material
    * @param[in] image The image used by the texture
    * @param[in] uniformName The uniform name of the texture
@@ -161,6 +118,12 @@ public:
   void SetTextureUniformName( size_t index, const std::string& uniformName );
 
   /**
+   * Return whether the textures or the shader require the opacity to be translucent
+   * @return The material's blend policy
+   */
+  bool IsTranslucent() const;
+
+  /**
    * Get the material resource status
    * Note, we need two values as it's possible that some resource failed to load
    * in which case resourcesReady is false (the material is not good to be rendered)
@@ -170,23 +133,6 @@ public:
    */
   void GetResourcesStatus( bool& resourcesReady, bool& finishedResourceAcquisition );
 
-public: // Implementation of MaterialDataProvider
-
-  /**
-   * @copydoc MaterialDataProvider::GetBlendColor
-   */
-  virtual Vector4* GetBlendColor() const;
-
-  /**
-   * @copydoc MaterialDataProvider::GetBlendingOptions
-   */
-  virtual const BlendingOptions& GetBlendingOptions() const;
-
-  /**
-   * @copydoc MaterialDataProvider::GetFaceCullingMode
-   */
-  virtual Dali::Material::FaceCullingMode GetFaceCullingMode() const;
-
 
 public: // Implementation of ObjectOwnerContainer template methods
 
@@ -286,18 +232,14 @@ private:
 private: // Data
 
   Shader*                         mShader;
-  Vector4*                        mBlendColor; // not double buffered as its not animateable and not frequently changed
   Vector< Render::Sampler* >      mSamplers; // Not owned
   Vector< ResourceId >            mTextureId;
   std::vector< std::string >      mUniformName;
   ConnectionChangePropagator      mConnectionObservers;
-  Dali::Material::FaceCullingMode mFaceCullingMode; // not double buffered as its not animateable and not frequently changed
-  BlendingMode::Type              mBlendingMode; // not double buffered as its not animateable and not frequently changed
-  BlendingOptions                 mBlendingOptions; // not double buffered as its not animateable and not frequently changed
-  BlendPolicy                     mBlendPolicy; ///< The blend policy as determined by PrepareRender
   bool                            mResourcesReady; ///< if the material is ready to be rendered
   bool                            mFinishedResourceAcquisition; ///< if resource loading is completed
   bool                            mMaterialChanged; ///< if the material has changed since the last frame
+  bool                            mIsTranslucent; ///< if the textures or the shader require the opacity to be translucent
 };
 
 inline void SetShaderMessage( EventThreadServices& eventThreadServices, const Material& material, Shader& shader )
@@ -311,46 +253,6 @@ inline void SetShaderMessage( EventThreadServices& eventThreadServices, const Ma
   new (slot) LocalType( &material, &Material::SetShader, &shader );
 }
 
-inline void SetFaceCullingModeMessage( EventThreadServices& eventThreadServices, const Material& material, Dali::Material::FaceCullingMode faceCullingMode )
-{
-  typedef MessageValue1< Material, unsigned int > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
-
-  new (slot) LocalType( &material, &Material::SetFaceCullingMode, faceCullingMode );
-}
-
-inline void SetBlendingModeMessage( EventThreadServices& eventThreadServices, const Material& material, BlendingMode::Type blendingMode )
-{
-  typedef MessageValue1< Material, unsigned int > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
-
-  new (slot) LocalType( &material, &Material::SetBlendingMode, blendingMode );
-}
-
-inline void SetBlendingOptionsMessage( EventThreadServices& eventThreadServices, const Material& material, unsigned int options )
-{
-  typedef MessageValue1< Material, unsigned int > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
-
-  new (slot) LocalType( &material, &Material::SetBlendingOptions, options );
-}
-
-inline void SetBlendColorMessage( EventThreadServices& eventThreadServices, const Material& material, const Vector4& blendColor )
-{
-  typedef MessageValue1< Material, Vector4 > LocalType;
-
-  // Reserve some memory inside the message queue
-  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
-
-  new (slot) LocalType( &material, &Material::SetBlendColor, blendColor );
-}
-
 inline void AddTextureMessage( EventThreadServices& eventThreadServices, const Material& material, const std::string& uniformName, ResourceId id, Render::Sampler* sampler )
 {
   typedef MessageValue3< Material, std::string, ResourceId, Render::Sampler* > LocalType;
index 7e7eb7b..0d79152 100644 (file)
@@ -87,6 +87,18 @@ void AddMappings( Dali::Internal::SceneGraph::CollectedUniformMap& localMap, con
     //@todo MESH_REWORK Use memcpy to copy ptrs from one array to the other
   }
 }
+
+// flags for resending data to renderer
+enum Flags
+{
+  RESEND_DATA_PROVIDER = 1,
+  RESEND_GEOMETRY = 1 << 1,
+  RESEND_FACE_CULLING_MODE = 1 << 2,
+  RESEND_BLEND_COLOR = 1 << 3,
+  RESEND_BLEND_BIT_MASK = 1 << 4,
+  RESEND_PREMULTIPLIED_ALPHA = 1 << 5
+};
+
 }
 
 namespace Dali
@@ -106,10 +118,13 @@ Renderer::Renderer()
  mRenderer(NULL),
  mMaterial(NULL),
  mGeometry(NULL),
+ mBlendColor(NULL),
+ mBlendBitmask(0u),
+ mFaceCullingMode( Dali::Renderer::NONE ),
+ mBlendingMode( Dali::BlendingMode::AUTO ),
  mReferenceCount(0),
  mRegenerateUniformMap(0),
- mResendDataProviders(false),
- mResendGeometry(false),
+ mResendFlag(0),
  mResourcesReady(false),
  mFinishedResourceAcquisition(false),
  mDepthIndex(0)
@@ -190,17 +205,22 @@ void Renderer::PrepareRender( BufferIndex updateBufferIndex )
     mRegenerateUniformMap--;
   }
 
-  if( mResendDataProviders )
+  if( mResendFlag == 0 )
+  {
+    return;
+  }
+
+  if( mResendFlag & RESEND_DATA_PROVIDER )
   {
     RenderDataProvider* dataProvider = NewRenderDataProvider();
 
     typedef MessageValue1< Render::Renderer, OwnerPointer<RenderDataProvider> > DerivedType;
     unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
     new (slot) DerivedType( mRenderer, &Render::Renderer::SetRenderDataProvider, dataProvider );
-    mResendDataProviders = false;
+    mResendFlag &= ~RESEND_DATA_PROVIDER;
   }
 
-  if( mResendGeometry )
+  if( mResendFlag & RESEND_GEOMETRY )
   {
     // The first call to GetRenderGeometry() creates the geometry and sends it in a message
     RenderGeometry* geometry = mGeometry->GetRenderGeometry( mSceneController );
@@ -209,7 +229,39 @@ void Renderer::PrepareRender( BufferIndex updateBufferIndex )
     unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
 
     new (slot) DerivedType( mRenderer, &Render::Renderer::SetGeometry, geometry );
-    mResendGeometry = false;
+    mResendFlag &= ~RESEND_GEOMETRY;
+  }
+
+  if( mResendFlag & RESEND_FACE_CULLING_MODE )
+  {
+    typedef MessageValue1< Render::Renderer, Dali::Renderer::FaceCullingMode > DerivedType;
+    unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
+    new (slot) DerivedType( mRenderer, &Render::Renderer::SetFaceCullingMode, mFaceCullingMode );
+    mResendFlag &= ~RESEND_FACE_CULLING_MODE;
+  }
+
+  if( mResendFlag & RESEND_BLEND_BIT_MASK )
+  {
+    typedef MessageValue1< Render::Renderer, unsigned int > DerivedType;
+    unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
+    new (slot) DerivedType( mRenderer, &Render::Renderer::SetBlendingBitMask, mBlendBitmask );
+    mResendFlag &= ~RESEND_BLEND_BIT_MASK;
+  }
+
+  if( mResendFlag & RESEND_BLEND_COLOR )
+  {
+    typedef MessageValue1< Render::Renderer, const Vector4* > DerivedType;
+    unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
+    new (slot) DerivedType( mRenderer, &Render::Renderer::SetBlendColor, mBlendColor );
+    mResendFlag &= ~RESEND_BLEND_COLOR;
+  }
+
+  if( mResendFlag & RESEND_PREMULTIPLIED_ALPHA  )
+  {
+    typedef MessageValue1< Render::Renderer, bool > DerivedType;
+    unsigned int* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) );
+    new (slot) DerivedType( mRenderer, &Render::Renderer::EnablePreMultipliedAlpha, mPremultipledAlphaEnabled );
+    mResendFlag &= ~RESEND_PREMULTIPLIED_ALPHA;
   }
 }
 
@@ -221,7 +273,7 @@ void Renderer::SetMaterial( BufferIndex bufferIndex, Material* material)
   mMaterial->AddConnectionObserver( *this );
   mRegenerateUniformMap = REGENERATE_UNIFORM_MAP;
 
-  mResendDataProviders = true;
+  mResendFlag |= RESEND_DATA_PROVIDER;
 }
 
 void Renderer::SetGeometry( BufferIndex bufferIndex, Geometry* geometry)
@@ -239,7 +291,7 @@ void Renderer::SetGeometry( BufferIndex bufferIndex, Geometry* geometry)
 
   if( mRenderer )
   {
-    mResendGeometry = true;
+    mResendFlag |= RESEND_GEOMETRY;
   }
 }
 
@@ -248,6 +300,46 @@ void Renderer::SetDepthIndex( int depthIndex )
   mDepthIndex = depthIndex;
 }
 
+void Renderer::SetFaceCullingMode( unsigned int faceCullingMode )
+{
+  mFaceCullingMode = static_cast<Dali::Renderer::FaceCullingMode>(faceCullingMode);
+  mResendFlag |= RESEND_FACE_CULLING_MODE;
+}
+
+void Renderer::SetBlendingMode( unsigned int blendingMode )
+{
+  mBlendingMode = static_cast< BlendingMode::Type >( blendingMode );
+}
+
+void Renderer::SetBlendingOptions( unsigned int options )
+{
+  if( mBlendBitmask != options)
+  {
+    mBlendBitmask = options;
+    mResendFlag |= RESEND_BLEND_BIT_MASK;
+  }
+}
+
+void Renderer::SetBlendColor( const Vector4& blendColor )
+{
+  if( !mBlendColor )
+  {
+    mBlendColor = new Vector4( blendColor );
+  }
+  else
+  {
+    *mBlendColor = blendColor;
+  }
+
+  mResendFlag |= RESEND_BLEND_COLOR;
+}
+
+void Renderer::EnablePreMultipliedAlpha( bool preMultipled )
+{
+  mPremultipledAlphaEnabled = preMultipled;
+  mResendFlag |= RESEND_PREMULTIPLIED_ALPHA;
+}
+
 //Called when a node with this renderer is added to the stage
 void Renderer::OnStageConnect()
 {
@@ -257,10 +349,12 @@ void Renderer::OnStageConnect()
     RenderDataProvider* dataProvider = NewRenderDataProvider();
 
     RenderGeometry* renderGeometry = mGeometry->GetRenderGeometry(mSceneController);
-    mRenderer = Render::Renderer::New( dataProvider, renderGeometry );
+    mRenderer = Render::Renderer::New( dataProvider, renderGeometry,
+                                       mBlendBitmask, mBlendColor,
+                                       static_cast< Dali::Renderer::FaceCullingMode >( mFaceCullingMode ),
+                                       mPremultipledAlphaEnabled );
     mSceneController->GetRenderMessageDispatcher().AddRenderer( *mRenderer );
-    mResendDataProviders = false;
-    mResendGeometry = false;
+    mResendFlag = 0;
   }
 }
 
@@ -303,7 +397,6 @@ RenderDataProvider* Renderer::NewRenderDataProvider()
 {
   RenderDataProvider* dataProvider = new RenderDataProvider();
 
-  dataProvider->mMaterialDataProvider = mMaterial;
   dataProvider->mUniformMapDataProvider = this;
   dataProvider->mShader = mMaterial->GetShader();
 
@@ -341,20 +434,38 @@ Renderer::Opacity Renderer::GetOpacity( BufferIndex updateBufferIndex, const Nod
 
   if( mMaterial )
   {
-    if( mMaterial->GetBlendPolicy() == Material::TRANSLUCENT )
-    {
-      opacity = Renderer::TRANSLUCENT;
-    }
-    else if( mMaterial->GetBlendPolicy() == Material::USE_ACTOR_COLOR  )
+    switch( mBlendingMode )
     {
-      float alpha = node.GetWorldColor( updateBufferIndex ).a;
-      if( alpha <= FULLY_TRANSPARENT )
+      case BlendingMode::ON: // If the renderer should always be use blending
       {
-        opacity = TRANSPARENT;
+        opacity = Renderer::TRANSLUCENT;
+        break;
+      }
+      case BlendingMode::AUTO:
+      {
+        if(mMaterial->IsTranslucent() ) // If the renderer should determine opacity using the material
+        {
+          opacity = Renderer::TRANSLUCENT;
+        }
+        else // renderer should determine opacity using the actor color
+        {
+          float alpha = node.GetWorldColor( updateBufferIndex ).a;
+          if( alpha <= FULLY_TRANSPARENT )
+          {
+            opacity = TRANSPARENT;
+          }
+          else if( alpha <= FULLY_OPAQUE )
+          {
+            opacity = TRANSLUCENT;
+          }
+        }
+        break;
       }
-      else if( alpha <= FULLY_OPAQUE )
+      case BlendingMode::OFF: // the renderer should never use blending
+      default:
       {
-        opacity = TRANSLUCENT;
+        opacity = Renderer::OPAQUE;
+        break;
       }
     }
   }
@@ -369,7 +480,7 @@ void Renderer::ConnectionsChanged( PropertyOwner& object )
   mRegenerateUniformMap = REGENERATE_UNIFORM_MAP;
 
   // Ensure the child object pointers get re-sent to the renderer
-  mResendDataProviders = true;
+  mResendFlag |= RESEND_DATA_PROVIDER;
 }
 
 void Renderer::ConnectedUniformMapChanged()
index 610b8ce..b3266f6 100644 (file)
@@ -19,6 +19,8 @@
 
 
 #include <dali/devel-api/rendering/geometry.h>
+#include <dali/devel-api/rendering/renderer.h> // Dali::Renderer
+#include <dali/internal/common/blending-options.h>
 #include <dali/internal/event/common/event-thread-services.h>
 #include <dali/internal/update/common/property-owner.h>
 #include <dali/internal/update/common/uniform-map.h>
@@ -125,6 +127,37 @@ public:
   }
 
   /**
+   * Set the face culling mode
+   * @param[in] faceCullingMode to use
+   */
+  void SetFaceCullingMode( unsigned int faceCullingMode );
+
+  /**
+   * Set the blending mode
+   * @param[in] blendingMode to use
+   */
+  void SetBlendingMode( unsigned int blendingMode );
+
+  /**
+   * Set the blending options. This should only be called from the update thread.
+   * @param[in] options A bitmask of blending options.
+   */
+  void SetBlendingOptions( unsigned int options );
+
+  /**
+   * Set the blend color for blending operation
+   * @param blendColor to pass to GL
+   */
+  void SetBlendColor( const Vector4& blendColor );
+
+  /**
+   * @brief Set whether the Pre-multiplied Alpha Blending is required
+   *
+   * @param[in] preMultipled whether alpha is pre-multiplied.
+   */
+  void EnablePreMultipliedAlpha( bool preMultipled );
+
+  /**
    * Called when an actor with this renderer is added to the stage
    */
   void OnStageConnect();
@@ -258,19 +291,26 @@ private:
    */
   RenderDataProvider* NewRenderDataProvider();
 
+private:
+
   SceneController* mSceneController;  ///< Used for initializing renderers whilst attached
   Render::Renderer*  mRenderer;    ///< Raw pointer to the new renderer (that's owned by RenderManager)
-  Material*             mMaterial;    ///< The material this renderer uses. (Not owned)
-  Geometry*             mGeometry;    ///< The geometry this renderer uses. (Not owned)
+  Material*          mMaterial;    ///< The material this renderer uses. (Not owned)
+  Geometry*          mGeometry;    ///< The geometry this renderer uses. (Not owned)
+
+  Vector4*                        mBlendColor;      ///< The blend color for blending operation
+  unsigned int                    mBlendBitmask;    ///< The bitmask of blending options
+  Dali::Renderer::FaceCullingMode mFaceCullingMode; ///< The mode of face culling
+  BlendingMode::Type              mBlendingMode;    ///< The mode of blending
 
   CollectedUniformMap mCollectedUniformMap[2]; ///< Uniform maps collected by the renderer
   unsigned int mReferenceCount;                ///< Number of nodes currently using this renderer
   unsigned int mRegenerateUniformMap;          ///< 2 if the map should be regenerated, 1 if it should be copied.
+  unsigned char mResendFlag;                    ///< Indicate whether data should be resent to the renderer
   bool         mUniformMapChanged[2];          ///< Records if the uniform map has been altered this frame
-  bool         mResendDataProviders;           ///< True if the data providers should be resent to the renderer
-  bool         mResendGeometry;                ///< True if geometry should be resent to the renderer
   bool         mResourcesReady;                ///< Set during the Update algorithm; true if the attachment has resources ready for the current frame.
   bool         mFinishedResourceAcquisition;   ///< Set during DoPrepareResources; true if ready & all resource acquisition has finished (successfully or otherwise)
+  bool         mPremultipledAlphaEnabled;      ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
 
 public:
   int mDepthIndex; ///< Used only in PrepareRenderInstructions
@@ -311,6 +351,56 @@ inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, cons
   new (slot) LocalType( &attachment, &Renderer::SetDepthIndex, depthIndex );
 }
 
+inline void SetFaceCullingModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, Dali::Renderer::FaceCullingMode faceCullingMode )
+{
+  typedef MessageValue1< Renderer, unsigned int > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+
+  new (slot) LocalType( &renderer, &Renderer::SetFaceCullingMode, faceCullingMode );
+}
+
+inline void SetBlendingModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, BlendingMode::Type blendingMode )
+{
+  typedef MessageValue1< Renderer, unsigned int > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+
+  new (slot) LocalType( &renderer, &Renderer::SetBlendingMode, blendingMode );
+}
+
+inline void SetBlendingOptionsMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, unsigned int options )
+{
+  typedef MessageValue1< Renderer, unsigned int > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+
+  new (slot) LocalType( &renderer, &Renderer::SetBlendingOptions, options );
+}
+
+inline void SetBlendColorMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Vector4& blendColor )
+{
+  typedef MessageValue1< Renderer, Vector4 > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+
+  new (slot) LocalType( &renderer, &Renderer::SetBlendColor, blendColor );
+}
+
+inline void SetEnablePreMultipliedAlphaMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, bool preMultiplied )
+{
+  typedef MessageValue1< Renderer, bool > LocalType;
+
+  // Reserve some memory inside the message queue
+  unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) );
+
+  new (slot) LocalType( &renderer, &Renderer::EnablePreMultipliedAlpha, preMultiplied );
+}
+
 inline void OnStageConnectMessage( EventThreadServices& eventThreadServices, const Renderer& renderer )
 {
   typedef Message< Renderer > LocalType;
index 8e2523e..eeb6f78 100644 (file)
@@ -82,7 +82,7 @@ enum Type
 {
   FIXED,                 ///< Size is fixed as set by SetSize @SINCE_1_0.0
   USE_NATURAL_SIZE,      ///< Size is to use the actor's natural size @SINCE_1_0.0
-  FILL_TO_PARENT,        ///< Size is to fill up to the actor's parent's bounds. Aspect ratio not maintained. @SINCE_1_0.0
+  FILL_TO_PARENT,        ///< Size is to fill up to the actor's parent's bounds. Aspect ratio is not maintained. @SINCE_1_0.0
   SIZE_RELATIVE_TO_PARENT,        ///< The actors size will be ( ParentSize * SizeRelativeToParentFactor ). @SINCE_1_0.0
   SIZE_FIXED_OFFSET_FROM_PARENT,  ///< The actors size will be ( ParentSize + SizeRelativeToParentFactor ). @SINCE_1_0.0
   FIT_TO_CHILDREN,       ///< Size will adjust to wrap around all children @SINCE_1_0.0
@@ -107,7 +107,7 @@ enum Type
 }
 
 /**
- * @brief Different types of alignment.
+ * @brief Horizontal alignment types.
  * @SINCE_1_0.0
  */
 namespace HorizontalAlignment
@@ -120,6 +120,10 @@ enum Type
 };
 }
 
+/**
+ * @brief Vertical alignment types.
+ * @SINCE_1_0.0
+ */
 namespace VerticalAlignment
 {
 enum Type
index d45eb95..ff2e5a2 100644 (file)
@@ -98,11 +98,12 @@ typedef Rect<float> Padding;      ///< Padding definition @SINCE_1_0.0
  *     {
  *       // Only hit-test the actor and its children if it is sensitive and visible
  *       IF ( ACTOR-IS-SENSITIVE &&
- *            ACTOR-IS-VISIBLE )
+ *            ACTOR-IS-VISIBLE &&
+ *            ACTOR-IS-ON-STAGE )
  *       {
  *         // Depth-first traversal within current layer, visiting parent first
  *
- *         // Check whether current actor should be hit-tested
+ *         // Check whether current actor should be hit-tested.
  *         IF ( ( TOUCH-SIGNAL-NOT-EMPTY || HOVER-SIGNAL-NOT-EMPTY ) &&
  *              ACTOR-HAS-NON-ZERO-SIZE &&
  *              ACTOR-WORLD-COLOR-IS-NOT-TRANSPARENT )
@@ -112,13 +113,13 @@ typedef Rect<float> Padding;      ///< Padding definition @SINCE_1_0.0
  *           {
  *             IF ( ACTOR-IS-OVERLAY || ( DISTANCE-TO-ACTOR < DISTANCE-TO-LAST-HIT-ACTOR ) )
  *             {
- *               // The current actor is the closest actor that was underneath the touch
+ *               // The current actor is the closest actor that was underneath the touch.
  *               LAST-HIT-ACTOR = CURRENT-ACTOR
  *             }
  *           }
  *         }
  *
- *         // Keep checking children, in case we hit something closer
+ *         // Keep checking children, in case we hit something closer.
  *         FOR-EACH CHILD (in order)
  *         {
  *           IF ( CHILD-IS-NOT-A-LAYER )
@@ -126,7 +127,7 @@ typedef Rect<float> Padding;      ///< Padding definition @SINCE_1_0.0
  *             // Continue traversal for this child's sub-tree
  *             HIT-TEST-WITHIN-LAYER ( CHILD )
  *           }
- *           // else we skip hit-testing the child's sub-tree altogether
+ *           // else we skip hit-testing the child's sub-tree altogether.
  *         }
  *       }
  *     }
@@ -188,7 +189,7 @@ typedef Rect<float> Padding;      ///< Padding definition @SINCE_1_0.0
  *
  *       IF ( NOT-CONSUMED )
  *       {
- *         // If event is not consumed then deliver it to the parent unless we reach the root actor
+ *         // If event is not consumed then deliver it to the parent unless we reach the root actor.
  *         IF ( ACTOR-PARENT )
  *         {
  *           EMIT-HOVER-SIGNAL( ACTOR-PARENT )
@@ -216,6 +217,7 @@ typedef Rect<float> Padding;      ///< Padding definition @SINCE_1_0.0
  *     touch signals are also emitted from the touch-down actor with an "Interrupted" state.
  *   - If the consumed actor on hover-start is not the same as the consumed actor on hover-finished, then
  *     hover signals are also emitted from the hover-started actor with an "Interrupted" state.
+ *
  * <h3>Key Events:</h3>
  *
  * Key events are received by an actor once set to grab key events, only one actor can be set as focused.
@@ -252,41 +254,41 @@ public:
   {
     enum
     {
-      PARENT_ORIGIN = DEFAULT_ACTOR_PROPERTY_START_INDEX, ///< name "parentOrigin",          type Vector3 @SINCE_1_0.0
-      PARENT_ORIGIN_X,                                    ///< name "parentOriginX",         type float @SINCE_1_0.0
-      PARENT_ORIGIN_Y,                                    ///< name "parentOriginY",         type float @SINCE_1_0.0
-      PARENT_ORIGIN_Z,                                    ///< name "parentOriginZ",         type float @SINCE_1_0.0
-      ANCHOR_POINT,                                       ///< name "anchorPoint",           type Vector3 @SINCE_1_0.0
-      ANCHOR_POINT_X,                                     ///< name "anchorPointX",          type float @SINCE_1_0.0
-      ANCHOR_POINT_Y,                                     ///< name "anchorPointY",          type float @SINCE_1_0.0
-      ANCHOR_POINT_Z,                                     ///< name "anchorPointZ",          type float @SINCE_1_0.0
-      SIZE,                                               ///< name "size",                  type Vector3 @SINCE_1_0.0
-      SIZE_WIDTH,                                         ///< name "sizeWidth",             type float @SINCE_1_0.0
-      SIZE_HEIGHT,                                        ///< name "sizeHeight",            type float @SINCE_1_0.0
-      SIZE_DEPTH,                                         ///< name "sizeDepth",             type float @SINCE_1_0.0
-      POSITION,                                           ///< name "position",              type Vector3 @SINCE_1_0.0
-      POSITION_X,                                         ///< name "positionX",             type float @SINCE_1_0.0
-      POSITION_Y,                                         ///< name "positionY",             type float @SINCE_1_0.0
-      POSITION_Z,                                         ///< name "positionZ",             type float @SINCE_1_0.0
-      WORLD_POSITION,                                     ///< name "worldPosition",         type Vector3    (read-only) @SINCE_1_0.0
-      WORLD_POSITION_X,                                   ///< name "worldPositionX",        type float      (read-only) @SINCE_1_0.0
-      WORLD_POSITION_Y,                                   ///< name "worldPositionY",        type float      (read-only) @SINCE_1_0.0
-      WORLD_POSITION_Z,                                   ///< name "worldPositionZ",        type float      (read-only) @SINCE_1_0.0
-      ORIENTATION,                                        ///< name "orientation",           type Quaternion @SINCE_1_0.0
-      WORLD_ORIENTATION,                                  ///< name "worldOrientation",      type Quaternion (read-only) @SINCE_1_0.0
-      SCALE,                                              ///< name "scale",                 type Vector3 @SINCE_1_0.0
-      SCALE_X,                                            ///< name "scaleX",                type float @SINCE_1_0.0
-      SCALE_Y,                                            ///< name "scaleY",                type float @SINCE_1_0.0
-      SCALE_Z,                                            ///< name "scaleZ",                type float @SINCE_1_0.0
-      WORLD_SCALE,                                        ///< name "worldScale",            type Vector3    (read-only) @SINCE_1_0.0
-      VISIBLE,                                            ///< name "visible",               type bool @SINCE_1_0.0
-      COLOR,                                              ///< name "color",                 type Vector4 @SINCE_1_0.0
-      COLOR_RED,                                          ///< name "colorRed",              type float @SINCE_1_0.0
-      COLOR_GREEN,                                        ///< name "colorGreen",            type float @SINCE_1_0.0
-      COLOR_BLUE,                                         ///< name "colorBlue",             type float @SINCE_1_0.0
-      COLOR_ALPHA,                                        ///< name "colorAlpha",            type float @SINCE_1_0.0
-      WORLD_COLOR,                                        ///< name "worldColor",            type Vector4    (read-only) @SINCE_1_0.0
-      WORLD_MATRIX,                                       ///< name "worldMatrix",           type Matrix     (read-only) @SINCE_1_0.0
+      PARENT_ORIGIN = DEFAULT_ACTOR_PROPERTY_START_INDEX, ///< name "parentOrigin",          type Vector3    (constraint-input) @SINCE_1_0.0
+      PARENT_ORIGIN_X,                                    ///< name "parentOriginX",         type float      (constraint-input) @SINCE_1_0.0
+      PARENT_ORIGIN_Y,                                    ///< name "parentOriginY",         type float      (constraint-input) @SINCE_1_0.0
+      PARENT_ORIGIN_Z,                                    ///< name "parentOriginZ",         type float      (constraint-input) @SINCE_1_0.0
+      ANCHOR_POINT,                                       ///< name "anchorPoint",           type Vector3    (constraint-input) @SINCE_1_0.0
+      ANCHOR_POINT_X,                                     ///< name "anchorPointX",          type float      (constraint-input) @SINCE_1_0.0
+      ANCHOR_POINT_Y,                                     ///< name "anchorPointY",          type float      (constraint-input) @SINCE_1_0.0
+      ANCHOR_POINT_Z,                                     ///< name "anchorPointZ",          type float      (constraint-input) @SINCE_1_0.0
+      SIZE,                                               ///< name "size",                  type Vector3    (animatable / constraint-input) @SINCE_1_0.0
+      SIZE_WIDTH,                                         ///< name "sizeWidth",             type float      (animatable / constraint-input) @SINCE_1_0.0
+      SIZE_HEIGHT,                                        ///< name "sizeHeight",            type float      (animatable / constraint-input) @SINCE_1_0.0
+      SIZE_DEPTH,                                         ///< name "sizeDepth",             type float      (animatable / constraint-input) @SINCE_1_0.0
+      POSITION,                                           ///< name "position",              type Vector3    (animatable / constraint-input) @SINCE_1_0.0
+      POSITION_X,                                         ///< name "positionX",             type float      (animatable / constraint-input) @SINCE_1_0.0
+      POSITION_Y,                                         ///< name "positionY",             type float      (animatable / constraint-input) @SINCE_1_0.0
+      POSITION_Z,                                         ///< name "positionZ",             type float      (animatable / constraint-input) @SINCE_1_0.0
+      WORLD_POSITION,                                     ///< name "worldPosition",         type Vector3    (read-only / constraint-input) @SINCE_1_0.0
+      WORLD_POSITION_X,                                   ///< name "worldPositionX",        type float      (read-only / constraint-input) @SINCE_1_0.0
+      WORLD_POSITION_Y,                                   ///< name "worldPositionY",        type float      (read-only / constraint-input) @SINCE_1_0.0
+      WORLD_POSITION_Z,                                   ///< name "worldPositionZ",        type float      (read-only / constraint-input) @SINCE_1_0.0
+      ORIENTATION,                                        ///< name "orientation",           type Quaternion (animatable / constraint-input) @SINCE_1_0.0
+      WORLD_ORIENTATION,                                  ///< name "worldOrientation",      type Quaternion (read-only / constraint-input) @SINCE_1_0.0
+      SCALE,                                              ///< name "scale",                 type Vector3    (animatable / constraint-input) @SINCE_1_0.0
+      SCALE_X,                                            ///< name "scaleX",                type float      (animatable / constraint-input) @SINCE_1_0.0
+      SCALE_Y,                                            ///< name "scaleY",                type float      (animatable / constraint-input) @SINCE_1_0.0
+      SCALE_Z,                                            ///< name "scaleZ",                type float      (animatable / constraint-input) @SINCE_1_0.0
+      WORLD_SCALE,                                        ///< name "worldScale",            type Vector3    (read-only / constraint-input) @SINCE_1_0.0
+      VISIBLE,                                            ///< name "visible",               type bool       (animatable / constraint-input) @SINCE_1_0.0
+      COLOR,                                              ///< name "color",                 type Vector4    (animatable / constraint-input) @SINCE_1_0.0
+      COLOR_RED,                                          ///< name "colorRed",              type float      (animatable / constraint-input) @SINCE_1_0.0
+      COLOR_GREEN,                                        ///< name "colorGreen",            type float      (animatable / constraint-input) @SINCE_1_0.0
+      COLOR_BLUE,                                         ///< name "colorBlue",             type float      (animatable / constraint-input) @SINCE_1_0.0
+      COLOR_ALPHA,                                        ///< name "colorAlpha",            type float      (animatable / constraint-input) @SINCE_1_0.0
+      WORLD_COLOR,                                        ///< name "worldColor",            type Vector4    (read-only / constraint-input) @SINCE_1_0.0
+      WORLD_MATRIX,                                       ///< name "worldMatrix",           type Matrix     (read-only / constraint-input) @SINCE_1_0.0
       NAME,                                               ///< name "name",                  type std::string @SINCE_1_0.0
       SENSITIVE,                                          ///< name "sensitive",             type bool @SINCE_1_0.0
       LEAVE_REQUIRED,                                     ///< name "leaveRequired",         type bool @SINCE_1_0.0
@@ -321,7 +323,7 @@ public:
   /**
    * @brief Create an uninitialized Actor; this can be initialized with Actor::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized Actor handle is not allowed.
    * @SINCE_1_0.0
    */
   Actor();
@@ -335,7 +337,7 @@ public:
   static Actor New();
 
   /**
-   * @brief Downcast an Object handle to Actor handle.
+   * @brief Downcast a handle to Actor handle.
    *
    * If handle points to a Actor object the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
@@ -367,6 +369,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param [in] rhs The actor to copy.
+   * @return A reference to this
    */
   Actor& operator=(const Actor& rhs);
 
@@ -440,17 +443,17 @@ public:
   /**
    * @brief Adds a child Actor to this Actor.
    *
-   * NOTE! if the child already has a parent, it will be removed from old parent
-   * and reparented to this actor. This may change childs position, color,
-   * scale etc as it now inherits them from this actor
    * @SINCE_1_0.0
    * @param [in] child The child.
    * @pre This Actor (the parent) has been initialized.
    * @pre The child actor has been initialized.
    * @pre The child actor is not the same as the parent actor.
-   * @pre The actor is not the Root actor
+   * @pre The actor is not the Root actor.
    * @post The child will be referenced by its parent. This means that the child will be kept alive,
    * even if the handle passed into this method is reset or destroyed.
+   * @note if the child already has a parent, it will be removed from old parent
+   * and reparented to this actor. This may change childs position, color,
+   * scale etc as it now inherits them from this actor.
    */
   void Add(Actor child);
 
@@ -496,7 +499,7 @@ public:
   /**
    * @brief Search through this actor's hierarchy for an actor with the given name.
    *
-   * The actor itself is also considered in the search
+   * The actor itself is also considered in the search.
    * @SINCE_1_0.0
    * @param[in] actorName the name of the actor to find
    * @return A handle to the actor if found, or an empty handle if not.
@@ -507,7 +510,7 @@ public:
   /**
    * @brief Search through this actor's hierarchy for an actor with the given unique ID.
    *
-   * The actor itself is also considered in the search
+   * The actor itself is also considered in the search.
    * @SINCE_1_0.0
    * @param[in] id the ID of the actor to find
    * @return A handle to the actor if found, or an empty handle if not.
@@ -635,9 +638,9 @@ public:
    * @brief Retrieve the actor's size.
    *
    * @SINCE_1_0.0
-   * @return The actor's current size.
+   * @return The actor's target size.
    * @pre The actor has been initialized.
-   * @note This return is the value that was set using SetSize or the target size of an animation
+   * @note This return is the value that was set using SetSize or the target size of an animation.
    */
   Vector3 GetTargetSize() const;
 
@@ -770,7 +773,7 @@ public:
    * @brief Returns the actors position inheritance mode.
    *
    * @SINCE_1_0.0
-   * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
+   * @return Return the position inheritance mode.
    * @pre The Actor has been initialized.
    */
   PositionInheritanceMode GetPositionInheritanceMode() const;
@@ -867,10 +870,10 @@ public:
   void SetInheritOrientation(bool inherit);
 
   /**
-   * @brief Returns whether the actor inherit's it's parent's orientation.
+   * @brief Returns whether the actor inherits its parent's orientation.
    *
    * @SINCE_1_0.0
-   * @return true if the actor inherit's it's parent orientation, false if it uses world orientation.
+   * @return True if the actor inherits its parent orientation, false if it uses world orientation.
    * @pre The Actor has been initialized.
    */
   bool IsOrientationInherited() const;
@@ -921,7 +924,7 @@ public:
    * @brief Apply a relative scale to an actor.
    *
    * @SINCE_1_0.0
-   * @param[in] relativeScale The scale to combine with the actors existing scale.
+   * @param[in] relativeScale The scale to combine with the actor's existing scale.
    * @pre The actor has been initialized.
    */
   void ScaleBy(const Vector3& relativeScale);
@@ -958,10 +961,10 @@ public:
   void SetInheritScale( bool inherit );
 
   /**
-   * @brief Returns whether the actor inherit's it's parent's scale.
+   * @brief Returns whether the actor inherits its parent's scale.
    *
    * @SINCE_1_0.0
-   * @return true if the actor inherit's it's parent scale, false if it uses world scale.
+   * @return True if the actor inherits its parent scale, false if it uses world scale.
    * @pre The Actor has been initialized.
    */
   bool IsScaleInherited() const;
@@ -1080,12 +1083,12 @@ public:
    * @brief Set how the actor and its children should be drawn.
    *
    * Not all actors are renderable, but DrawMode can be inherited from any actor.
-   * By default a renderable actor will be drawn as a 3D object. It will be depth-tested against
+   * If an object is in a 3D layer, it will be depth-tested against
    * other objects in the world i.e. it may be obscured if other objects are in front.
    *
    * If DrawMode::OVERLAY_2D is used, the actor and its children will be drawn as a 2D overlay.
    * Overlay actors are drawn in a separate pass, after all non-overlay actors within the Layer.
-   * For overlay actors, the drawing order is with respect to depthIndex property of Renderers,
+   * For overlay actors, the drawing order is with respect to tree levels of Actors,
    * and depth-testing will not be used.
    *
    * If DrawMode::STENCIL is used, the actor and its children will be used to stencil-test other actors
@@ -1103,7 +1106,7 @@ public:
    * @brief Query how the actor and its children will be drawn.
    *
    * @SINCE_1_0.0
-   * @return True if the Actor is an overlay.
+   * @return Return the draw mode type.
    */
   DrawMode::Type GetDrawMode() const;
 
@@ -1132,7 +1135,7 @@ public:
    * @note If an actor's sensitivity is set to false, then it's children will not be hittable either.
    *       This is regardless of the individual sensitivity values of the children i.e. an actor will only be
    *       hittable if all of its parents have sensitivity set to true.
-   * @see @see SignalTouch() and SignalHover().
+   * @see @see TouchedSignal() and HoveredSignal().
    */
   void SetSensitive(bool sensitive);
 
@@ -1140,7 +1143,7 @@ public:
    * @brief Query whether an actor emits touch or hover event signals.
    *
    * @SINCE_1_0.0
-   * @return true, if emission of touch or hover event signals is enabled, false otherwise.
+   * @return True, if emission of touch or hover event signals is enabled, false otherwise.
    * @pre The Actor has been initialized.
    * @note If an actor is not sensitive, then it's children will not be hittable either.
    *       This is regardless of the individual sensitivity values of the children i.e. an actor will only be
@@ -1170,7 +1173,7 @@ public:
    * @param[in]  required  Should be set to true if a Leave event is required
    * @pre The Actor has been initialized.
    * @note By default, this is set to false as most actors do not require this.
-   * @note Need to connect to the SignalTouch or SignalHover to actually receive this event.
+   * @note Need to connect to the TouchedSignal() or HoveredSignal() to actually receive this event.
    *
    */
   void SetLeaveRequired(bool required);
@@ -1180,7 +1183,7 @@ public:
    * the boundary of the actor.
    *
    * @SINCE_1_0.0
-   * @return true if a Leave event is required, false otherwise.
+   * @return True if a Leave event is required, false otherwise.
    * @pre The Actor has been initialized.
    */
   bool GetLeaveRequired() const;
@@ -1200,7 +1203,7 @@ public:
    * @brief Returns whether the actor is focusable by keyboard navigation.
    *
    * @SINCE_1_0.0
-   * @return true if the actor is focusable by keyboard navigation, false if not.
+   * @return True if the actor is focusable by keyboard navigation, false if not.
    * @pre The Actor has been initialized.
    */
   bool IsKeyboardFocusable() const;
@@ -1208,7 +1211,7 @@ public:
   // SIZE NEGOTIATION
 
   /**
-   * @brief Set the resize policy to be used for the given dimension(s)
+   * @brief Set the resize policy to be used for the given dimension(s).
    *
    * @SINCE_1_0.0
    * @param[in] policy The resize policy to use
@@ -1217,11 +1220,11 @@ public:
   void SetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension );
 
   /**
-   * @brief Return the resize policy used for a single dimension
+   * @brief Return the resize policy used for a single dimension.
    *
    * @SINCE_1_0.0
    * @param[in] dimension The dimension to get policy for
-   * @return Return the dimension resize policy
+   * @return Return the dimension resize policy. If more than one dimension is requested, just return the first one found.
    */
   ResizePolicy::Type GetResizePolicy( Dimension::Type dimension ) const;
 
@@ -1234,10 +1237,10 @@ public:
   void SetSizeScalePolicy( SizeScalePolicy::Type policy );
 
   /**
-   * @brief Return the size set policy in use
+   * @brief Return the size scale policy in use.
    *
    * @SINCE_1_0.0
-   * @return Return the size set policy
+   * @return Return the size scale policy.
    */
   SizeScalePolicy::Type GetSizeScalePolicy() const;
 
@@ -1247,7 +1250,7 @@ public:
    * This factor is only used when ResizePolicy is set to either:
    * ResizePolicy::SIZE_RELATIVE_TO_PARENT or ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT.
    * This actor's size is set to the actor's size multipled by or added to this factor,
-   * depending on ResizePolicy (See SetResizePolicy).
+   * depending on ResizePolicy ( See SetResizePolicy() ).
    *
    * @SINCE_1_0.0
    * @param [in] factor A Vector3 representing the relative factor to be applied to each axis.
@@ -1265,40 +1268,40 @@ public:
   Vector3 GetSizeModeFactor() const;
 
   /**
-   * @brief Calculate the height of the actor given a width
+   * @brief Calculate the height of the actor given a width.
    *
    * The natural size is used for default calculation.
    * size 0 is treated as aspect ratio 1:1.
    *
    * @SINCE_1_0.0
    * @param width Width to use
-   * @return Return the height based on the width
+   * @return Return the height based on the width.
    */
   float GetHeightForWidth( float width );
 
   /**
-   * @brief Calculate the width of the actor given a height
+   * @brief Calculate the width of the actor given a height.
    *
    * The natural size is used for default calculation.
    * size 0 is treated as aspect ratio 1:1.
    *
    * @SINCE_1_0.0
    * @param height Height to use
-   * @return Return the width based on the height
+   * @return Return the width based on the height.
    */
   float GetWidthForHeight( float height );
 
   /**
-   * @brief Return the value of negotiated dimension for the given dimension
+   * @brief Return the value of negotiated dimension for the given dimension.
    *
    * @SINCE_1_0.0
    * @param dimension The dimension to retrieve
-   * @return Return the value of the negotiated dimension
+   * @return Return the value of the negotiated dimension. If more than one dimension is requested, just return the first one found.
    */
   float GetRelayoutSize( Dimension::Type dimension ) const;
 
   /**
-   * @brief Set the padding for use in layout
+   * @brief Set the padding for use in layout.
    *
    * @SINCE_1_0.0
    * @param[in] padding Padding for the actor
@@ -1306,7 +1309,7 @@ public:
   void SetPadding( const Padding& padding );
 
   /**
-   * @brief Return the value of the padding
+   * @brief Return the value of the padding.
    *
    * @SINCE_1_0.0
    * @param paddingOut The returned padding data
@@ -1314,7 +1317,7 @@ public:
   void GetPadding( Padding& paddingOut ) const;
 
   /**
-   * @brief Set the minimum size an actor can be assigned in size negotiation
+   * @brief Set the minimum size an actor can be assigned in size negotiation.
    *
    * @SINCE_1_0.0
    * @param[in] size The minimum size
@@ -1322,15 +1325,15 @@ public:
   void SetMinimumSize( const Vector2& size );
 
   /**
-   * @brief Return the minimum relayout size
+   * @brief Return the minimum relayout size.
    *
    * @SINCE_1_0.0
-   * @return Return the mininmum size
+   * @return Return the mininmum size.
    */
   Vector2 GetMinimumSize();
 
   /**
-   * @brief Set the maximum size an actor can be assigned in size negotiation
+   * @brief Set the maximum size an actor can be assigned in size negotiation.
    *
    * @SINCE_1_0.0
    * @param[in] size The maximum size
@@ -1338,15 +1341,15 @@ public:
   void SetMaximumSize( const Vector2& size );
 
   /**
-   * @brief Return the maximum relayout size
+   * @brief Return the maximum relayout size.
    *
    * @SINCE_1_0.0
-   * @return Return the maximum size
+   * @return Return the maximum size.
    */
   Vector2 GetMaximumSize();
 
   /**
-   * @brief Get depth in the hierarchy for the actor
+   * @brief Get depth in the hierarchy for the actor.
    *
    * @SINCE_1_0.0
    * @return The current depth in the hierarchy of the actor, or -1 if actor is not in the hierarchy
@@ -1455,20 +1458,22 @@ public: // Signals
    *
    * When an actor is connected, it will be directly or indirectly parented to the root Actor.
    * @SINCE_1_0.0
-   * @return The signal
+   * @return The signal to connect to.
    * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
    *
    * @note When the parent of a set of actors is connected to the stage, then all of the children
    * will received this callback.
-   *
    * For the following actor tree, the callback order will be A, B, D, E, C, and finally F.
    *
+   * @code
+   *
    *       A (parent)
    *      / \
    *     B   C
    *    / \   \
    *   D   E   F
    *
+   * @endcode
    */
   OnStageSignalType& OnStageSignal();
 
@@ -1478,18 +1483,21 @@ public: // Signals
    * If an actor is disconnected it either has no parent, or is parented to a disconnected actor.
    *
    * @SINCE_1_0.0
-   * @return The signal
+   * @return The signal to connect to.
    * @note When the parent of a set of actors is disconnected to the stage, then all of the children
    * will received this callback, starting with the leaf actors.
-   *
    * For the following actor tree, the callback order will be D, E, B, F, C, and finally A.
    *
+   * @code
+   *
    *       A (parent)
    *      / \
    *     B   C
    *    / \   \
    *   D   E   F
    *
+   * @endcode
+   *
    */
   OffStageSignalType& OffStageSignal();
 
@@ -1504,7 +1512,7 @@ public: // Signals
 public: // Not intended for application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by Actor::New() methods.
    *
    * @SINCE_1_0.0
    * @param [in] actor A pointer to a newly allocated Dali resource
@@ -1516,7 +1524,7 @@ public: // Not intended for application developers
  * @brief Helper for discarding an actor handle.
  *
  * If the handle is empty, this method does nothing.  Otherwise
- * actor.Unparent() will be called, followed by actor.Reset().
+ * Actor::Unparent() will be called, followed by Actor::Reset().
  * @SINCE_1_0.0
  * @param[in,out] actor A handle to an actor, or an empty handle.
  */
index 4b3882c..c3f33c7 100644 (file)
@@ -33,6 +33,8 @@ namespace BlendingMode
 /**
  * @brief Blending mode.
  * @SINCE_1_0.0
+ * @remarks This is an experimental feature and might not be supported in the next release.
+ * We do recommend not to use it.
  */
 enum Type
 {
@@ -49,25 +51,26 @@ namespace BlendingFactor
  * @brief Blending Factor.
  *
  * @SINCE_1_0.0
- * @see Dali::RenderableActor::SetBlendFunc() and Dali::RenderableActor::GetBlendFunc()
+ * @remarks This is an experimental feature and might not be supported in the next release.
+ * We do recommend not to use it.
  */
 enum Type
 {
-  ZERO                     = 0,
-  ONE                      = 1,
-  SRC_COLOR                = 0x0300,
-  ONE_MINUS_SRC_COLOR      = 0x0301,
-  SRC_ALPHA                = 0x0302,
-  ONE_MINUS_SRC_ALPHA      = 0x0303,
-  DST_ALPHA                = 0x0304,
-  ONE_MINUS_DST_ALPHA      = 0x0305,
-  DST_COLOR                = 0x0306,
-  ONE_MINUS_DST_COLOR      = 0x0307,
-  SRC_ALPHA_SATURATE       = 0x0308,
-  CONSTANT_COLOR           = 0x8001,
-  ONE_MINUS_CONSTANT_COLOR = 0x8002,
-  CONSTANT_ALPHA           = 0x8003,
-  ONE_MINUS_CONSTANT_ALPHA = 0x8004
+  ZERO                     = 0,  ///< ZERO @SINCE_1_0.0
+  ONE                      = 1,  ///< ONE @SINCE_1_0.0
+  SRC_COLOR                = 0x0300,  ///< SRC_COLOR @SINCE_1_0.0
+  ONE_MINUS_SRC_COLOR      = 0x0301,  ///< ONE_MINUS_SRC_COLOR @SINCE_1_0.0
+  SRC_ALPHA                = 0x0302,  ///< SRC_ALPHA @SINCE_1_0.0
+  ONE_MINUS_SRC_ALPHA      = 0x0303,  ///< ONE_MINUS_SRC_ALPHA @SINCE_1_0.0
+  DST_ALPHA                = 0x0304,  ///< DST_ALPHA @SINCE_1_0.0
+  ONE_MINUS_DST_ALPHA      = 0x0305,  ///< ONE_MINUS_DST_ALPHA @SINCE_1_0.0
+  DST_COLOR                = 0x0306,  ///< DST_COLOR @SINCE_1_0.0
+  ONE_MINUS_DST_COLOR      = 0x0307,  ///< ONE_MINUS_DST_COLOR @SINCE_1_0.0
+  SRC_ALPHA_SATURATE       = 0x0308,  ///< SRC_ALPHA_SATURATE @SINCE_1_0.0
+  CONSTANT_COLOR           = 0x8001,  ///< CONSTANT_COLOR @SINCE_1_0.0
+  ONE_MINUS_CONSTANT_COLOR = 0x8002,  ///< ONE_MINUS_CONSTANT_COLOR @SINCE_1_0.0
+  CONSTANT_ALPHA           = 0x8003,  ///< CONSTANT_ALPHA @SINCE_1_0.0
+  ONE_MINUS_CONSTANT_ALPHA = 0x8004  ///< ONE_MINUS_CONSTANT_ALPHA @SINCE_1_0.0
 };
 
 } // namespace BlendingFactor
@@ -78,13 +81,14 @@ namespace BlendingEquation
  * @brief Blending Equation.
  *
  * @SINCE_1_0.0
- * @see Dali::RenderableActor::SetBlendEquation() and Dali::RenderableActor::GetBlendEquation()
+ * @remarks This is an experimental feature and might not be supported in the next release.
+ * We do recommend not to use it.
  */
 enum Type
 {
-  ADD              = 0x8006,
-  SUBTRACT         = 0x800A,
-  REVERSE_SUBTRACT = 0x800B
+  ADD              = 0x8006,  ///< The source and destination colors are added to each other. @SINCE_1_0.0
+  SUBTRACT         = 0x800A,  ///< Subtracts the destination from the source. @SINCE_1_0.0
+  REVERSE_SUBTRACT = 0x800B  ///< Subtracts the source from the destination. @SINCE_1_0.0
 };
 
 } // namespace BlendingEquation
index ffe6368..0c44da0 100644 (file)
@@ -32,6 +32,10 @@ namespace Internal DALI_INTERNAL
 class CameraActor;
 }
 
+/**
+ * @brief Camera enumerations.
+ * @SINCE_1_0.0
+ */
 namespace Camera
 {
 /**
@@ -78,6 +82,7 @@ public:
 
   /**
    * @brief An enumeration of properties belonging to the CameraActor class.
+   *
    * Properties additional to Actor.
    * @SINCE_1_0.0
    */
@@ -105,8 +110,8 @@ public:
   /**
    * @brief Create an uninitialized CameraActor handle.
    *
-   * Initialise it using CameraActor::New().  Calling member functions
-   * with an uninitialized Dali::Object is not allowed.
+   * Initialise it using CameraActor::New().
+   * Calling member functions with an uninitialized CameraActor handle is not allowed.
    * @SINCE_1_0.0
    */
   CameraActor();
@@ -116,7 +121,7 @@ public:
    *
    * Sets the default camera perspective projection for the stage's size. @see SetPerspectiveProjection().
    * @SINCE_1_0.0
-   * @return the newly created camera actor.
+   * @return The newly created camera actor.
    */
   static CameraActor New();
 
@@ -127,18 +132,18 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] size The canvas size.
-   * @return the newly created camera actor.
+   * @return The newly created camera actor.
    */
   static CameraActor New( const Size& size );
 
   /**
-   * @brief Downcast an Object handle to CameraActor.
+   * @brief Downcast a handle to CameraActor handle.
    *
    * If handle points to a CameraActor the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle to An object
-   * @return handle to a CameraActor or an uninitialized handle
+   * @return Handle to a CameraActor or an uninitialized handle
    */
   static CameraActor DownCast( BaseHandle handle );
 
@@ -163,6 +168,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param [in] rhs The actor to copy.
+   * @return A reference to this
    */
   CameraActor& operator=(const CameraActor& rhs);
 
@@ -178,7 +184,7 @@ public:
    * @brief Get the type of the camera.
    *
    * @SINCE_1_0.0
-   * @return the type of camera
+   * @return The type of camera
    */
   Dali::Camera::Type GetType() const;
 
@@ -209,7 +215,7 @@ public:
   /**
    * @brief Get the field of view in Radians.
    *
-   * The default field of view is 45 degrees
+   * The default field of view is 45 degrees.
    * @SINCE_1_0.0
    * @return The field of view in radians
    */
@@ -226,9 +232,9 @@ public:
   /**
    * @brief Get the aspect ratio of the camera.
    *
-   * The default aspect ratio is 4.0f/3.0f
+   * The default aspect ratio is 4.0f/3.0f.
    * @SINCE_1_0.0
-   * @return the aspect ratio
+   * @return The aspect ratio
    */
   float GetAspectRatio( );
 
@@ -236,17 +242,17 @@ public:
    * @brief Sets the near clipping plane distance.
    *
    * @SINCE_1_0.0
-   * @param[in] nearClippingPlane distance of the near clipping plane
+   * @param[in] nearClippingPlane Distance of the near clipping plane
    */
   void SetNearClippingPlane( float nearClippingPlane );
 
   /**
    * @brief Get the near clipping plane distance.
    *
-   * The default near clipping plane is 800.0f, to match the default screen height
-   * Reduce this value to see objects closer to the camera
+   * The default near clipping plane is 800.0f, to match the default screen height.
+   * Reduce this value to see objects closer to the camera.
    * @SINCE_1_0.0
-   * @return the near clipping plane value
+   * @return The near clipping plane value
    */
   float GetNearClippingPlane( );
 
@@ -254,16 +260,16 @@ public:
    * @brief Sets the far clipping plane distance.
    *
    * @SINCE_1_0.0
-   * @param[in] farClippingPlane distance of the far clipping plane
+   * @param[in] farClippingPlane Distance of the far clipping plane
    */
   void SetFarClippingPlane( float farClippingPlane );
 
   /**
    * @brief Get the far clipping plane distance.
    *
-   * The default value is the default near clipping plane + (0xFFFF>>4)
+   * The default value is the default near clipping plane + (0xFFFF>>4).
    * @SINCE_1_0.0
-   * @return the far clipping plane value
+   * @return The far clipping plane value
    */
   float GetFarClippingPlane( );
 
@@ -272,17 +278,17 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] targetPosition The position of the target to look at
-   * @pre Camera type is LOOK_AT_TARGET
+   * @pre Camera type is LOOK_AT_TARGET.
    */
   void SetTargetPosition( const Vector3& targetPosition );
 
   /**
    * @brief Get Camera Target position.
    *
-   * The target position is Vector3::ZERO
+   * The default target position is Vector3::ZERO.
    * @SINCE_1_0.0
    * @return The target position of the camera
-   * @pre Camera type is LOOK_AT_TARGET
+   * @pre Camera type is LOOK_AT_TARGET.
    */
   Vector3 GetTargetPosition() const;
 
@@ -353,7 +359,7 @@ public:
 
 public: // Not intended for use by Application developers
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by CameraActor::New() methods.
    *
    * @SINCE_1_0.0
    * @param [in] actor A pointer to a newly allocated Dali resource
index dbe66cd..975d4fe 100644 (file)
@@ -58,7 +58,7 @@ typedef IntrusivePtr<CustomActorImpl> CustomActorImplPtr;
  * @brief CustomActorImpl is an abstract base class for custom control implementations.
  *
  * This provides a series of pure virtual methods, which are called when actor-specific events occur.
- * An CustomActorImpl is typically owned by a single CustomActor instance; see also CustomActor::New(CustomActorImplPtr).
+ * And CustomActorImpl is typically owned by a single CustomActor instance; see also CustomActor::CustomActor( CustomActorImpl &implementation ).
  * @SINCE_1_0.0
  */
 class DALI_IMPORT_API CustomActorImpl : public Dali::RefObject
@@ -68,7 +68,7 @@ public:
   class Extension; ///< Forward declare future extension interface
 
   /**
-   * @brief Virtual destructor.
+   * @brief Virtual destructor
    * @SINCE_1_0.0
    */
   virtual ~CustomActorImpl();
@@ -86,39 +86,45 @@ public:
    *
    * When an actor is connected, it will be directly or indirectly parented to the root Actor.
    * @SINCE_1_0.0
-   * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
+   * @param[in] depth The depth in the hierarchy for the actor
    *
-   * @note When the parent of a set of actors is connected to the stage, then all of the children
+   * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
+   * When the parent of a set of actors is connected to the stage, then all of the children
    * will received this callback.
-   *
    * For the following actor tree, the callback order will be A, B, D, E, C, and finally F.
    *
+   * @code
+   *
    *       A (parent)
    *      / \
    *     B   C
    *    / \   \
    *   D   E   F
    *
-   *   @param[in] depth The depth in the hierarchy for the actor
+   * @endcode
+   * @param[in] depth The depth in the hierarchy for the actor
    */
   virtual void OnStageConnection( int depth ) = 0;
 
   /**
-   * @brief Called after the actor has been disconnected from the stage.
+   * @brief Called after the actor has been disconnected from Stage.
    *
    * If an actor is disconnected it either has no parent, or is parented to a disconnected actor.
    *
    * @SINCE_1_0.0
    * @note When the parent of a set of actors is disconnected to the stage, then all of the children
    * will received this callback, starting with the leaf actors.
-   *
    * For the following actor tree, the callback order will be D, E, B, F, C, and finally A.
    *
+   * @code
+   *
    *       A (parent)
    *      / \
    *     B   C
    *    / \   \
    *   D   E   F
+   *
+   * @endcode
    */
   virtual void OnStageDisconnection() = 0;
 
@@ -126,7 +132,7 @@ public:
    * @brief Called after a child has been added to the owning actor.
    *
    * @SINCE_1_0.0
-   * @param[in] child The child which has been added.
+   * @param[in] child The child which has been added
    */
   virtual void OnChildAdd(Actor& child) = 0;
 
@@ -134,7 +140,7 @@ public:
    * @brief Called after a child has been removed from the owning actor.
    *
    * @SINCE_1_0.0
-   * @param[in] child The child being removed.
+   * @param[in] child The child being removed
    */
   virtual void OnChildRemove(Actor& child) = 0;
 
@@ -142,8 +148,8 @@ public:
    * @brief Called when the owning actor property is set.
    *
    * @SINCE_1_0.0
-   * @param[in] index The Property index that was set.
-   * @param[in] propertyValue The value to set.
+   * @param[in] index The Property index that was set
+   * @param[in] propertyValue The value to set
    */
   virtual void OnPropertySet( Property::Index index, Property::Value propertyValue );
 
@@ -151,7 +157,7 @@ public:
    * @brief Called when the owning actor's size is set e.g. using Actor::SetSize().
    *
    * @SINCE_1_0.0
-   * @param[in] targetSize The target size. Note that this target size may not match the size returned via Actor::GetSize().
+   * @param[in] targetSize The target size. Note that this target size may not match the size returned via @ref Actor::GetTargetSize.
    */
   virtual void OnSizeSet(const Vector3& targetSize) = 0;
 
@@ -160,7 +166,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] animation The object which is animating the owning actor.
-   * @param[in] targetSize The target size. Note that this target size may not match the size returned via Actor::GetSize().
+   * @param[in] targetSize The target size. Note that this target size may not match the size returned via @ref Actor::GetTargetSize.
    */
   virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize) = 0;
 
@@ -168,9 +174,9 @@ public:
    * @brief Called after a touch-event is received by the owning actor.
    *
    * @SINCE_1_0.0
-   * @param[in] event The touch event.
+   * @param[in] event The touch event
    * @return True if the event should be consumed.
-   * @note This must be enabled during construction; see CustomActorImpl::CustomActorImpl(bool)
+   * @note CustomActorImpl::REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
   virtual bool OnTouchEvent(const TouchEvent& event) = 0;
 
@@ -178,9 +184,9 @@ public:
    * @brief Called after a hover-event is received by the owning actor.
    *
    * @SINCE_1_0.0
-   * @param[in] event The hover event.
+   * @param[in] event The hover event
    * @return True if the event should be consumed.
-   * @note This must be enabled during construction; see CustomActorImpl::SetRequiresHoverEvents(bool)
+   * @note CustomActorImpl::REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
   virtual bool OnHoverEvent(const HoverEvent& event) = 0;
 
@@ -197,9 +203,9 @@ public:
    * @brief Called after a wheel-event is received by the owning actor.
    *
    * @SINCE_1_0.0
-   * @param[in] event The wheel event.
+   * @param[in] event The wheel event
    * @return True if the event should be consumed.
-   * @note This must be enabled during construction; see CustomActorImpl::SetRequiresWheelEvents(bool)
+   * @note CustomActorImpl::REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
    */
   virtual bool OnWheelEvent(const WheelEvent& event) = 0;
 
@@ -212,13 +218,12 @@ public:
    * actors differently after certain operations like add or remove
    * actors, resize or after changing specific properties.
    *
-   * Note! As this function is called from inside the size negotiation algorithm, you cannot
-   * call RequestRelayout (the call would just be ignored)
-   *
    * @SINCE_1_0.0
    * @param[in]      size       The allocated size.
    * @param[in,out]  container  The control should add actors to this container that it is not able
    *                            to allocate a size for.
+   * @note  As this function is called from inside the size negotiation algorithm, you cannot
+   * call RequestRelayout (the call would just be ignored).
    */
   virtual void OnRelayout( const Vector2& size, RelayoutContainer& container ) = 0;
 
@@ -232,7 +237,7 @@ public:
   virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) = 0;
 
   /**
-   * @brief Return the natural size of the actor
+   * @brief Return the natural size of the actor.
    *
    * @SINCE_1_0.0
    * @return The actor's natural size
@@ -240,12 +245,12 @@ public:
   virtual Vector3 GetNaturalSize() = 0;
 
   /**
-   * @brief Calculate the size for a child
+   * @brief Calculate the size for a child.
    *
    * @SINCE_1_0.0
    * @param[in] child The child actor to calculate the size for
    * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
-   * @return Return the calculated size for the given dimension
+   * @return Return the calculated size for the given dimension.
    */
   virtual float CalculateChildSize( const Dali::Actor& child, Dimension::Type dimension ) = 0;
 
@@ -255,8 +260,8 @@ public:
    * Derived classes should override this if they wish to customize the height returned.
    *
    * @SINCE_1_0.0
-   * @param width to use.
-   * @return the height based on the width.
+   * @param width Width to use.
+   * @return The height based on the width.
    */
   virtual float GetHeightForWidth( float width ) = 0;
 
@@ -266,17 +271,17 @@ public:
    * Derived classes should override this if they wish to customize the width returned.
    *
    * @SINCE_1_0.0
-   * @param height to use.
-   * @return the width based on the width.
+   * @param height Height to use.
+   * @return The width based on the width.
    */
   virtual float GetWidthForHeight( float height ) = 0;
 
   /**
-   * @brief Determine if this actor is dependent on it's children for relayout
+   * @brief Determine if this actor is dependent on it's children for relayout.
    *
    * @SINCE_1_0.0
    * @param dimension The dimension(s) to check for
-   * @return Return if the actor is dependent on it's children
+   * @return Return if the actor is dependent on it's children.
    */
   virtual bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) = 0;
 
@@ -300,7 +305,7 @@ public:
   virtual void OnLayoutNegotiated( float size, Dimension::Type dimension ) = 0;
 
   /**
-   * @brief Retrieve the extension for this control
+   * @brief Retrieve the extension for this control.
    *
    * @SINCE_1_0.0
    * @return The extension if available, NULL otherwise
@@ -336,7 +341,7 @@ protected: // For derived classes
   // Size negotiation helpers
 
   /**
-   * @brief Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene)
+   * @brief Request a relayout, which means performing a size negotiation on this actor, its parent and children (and potentially whole scene).
    *
    * This method can also be called from a derived class every time it needs a different size.
    * At the end of event processing, the relayout process starts and
@@ -349,47 +354,48 @@ protected: // For derived classes
   void RelayoutRequest();
 
   /**
-   * @brief provides the Actor implementation of GetHeightForWidth
+   * @brief Provides the Actor implementation of GetHeightForWidth.
    * @SINCE_1_0.0
-   * @param width to use.
-   * @return the height based on the width.
+   * @param width Width to use.
+   * @return The height based on the width.
    */
   float GetHeightForWidthBase( float width );
 
   /**
-   * @brief provides the Actor implementation of GetWidthForHeight
+   * @brief Provides the Actor implementation of GetWidthForHeight.
    * @SINCE_1_0.0
-   * @param height to use.
-   * @return the width based on the height.
+   * @param height Height to use.
+   * @return The width based on the height.
    */
   float GetWidthForHeightBase( float height );
 
   /**
-   * @brief Calculate the size for a child using the base actor object
+   * @brief Calculate the size for a child using the base actor object.
    *
    * @SINCE_1_0.0
    * @param[in] child The child actor to calculate the size for
-   * @param[in] dimension The dimension to calculate the size for. E.g. width or height.
-   * @return Return the calculated size for the given dimension
+   * @param[in] dimension The dimension to calculate the size for. E.g. width or height
+   * @return Return the calculated size for the given dimension. If more than one dimension is requested, just return the first one found.
    */
   float CalculateChildSizeBase( const Dali::Actor& child, Dimension::Type dimension );
 
   /**
-   * @brief Determine if this actor is dependent on it's children for relayout from the base class
+   * @brief Determine if this actor is dependent on it's children for relayout from the base class.
    *
    * @SINCE_1_0.0
    * @param dimension The dimension(s) to check for
-   * @return Return if the actor is dependent on it's children
+   * @return Return if the actor is dependent on it's children.
    */
   bool RelayoutDependentOnChildrenBase( Dimension::Type dimension = Dimension::ALL_DIMENSIONS );
 
 public: // Not intended for application developers
 
   /**
-   * @brief Called when ownership of the CustomActorImpl is passed to a CustomActor.
+   * @brief Initialize a CustomActor.
    * @SINCE_1_0.0
-   * @param[in] owner The owning object.
+   * @param[in] owner The owning object
    * @pre The CustomActorImpl is not already owned.
+   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
    */
   void Initialize(Internal::CustomActor& owner);
 
@@ -400,35 +406,39 @@ public: // Not intended for application developers
    * Owner is the Dali::Internal::CustomActor that owns the implementation of the custom actor
    * inside core. Creation of a handle to Dali public API Actor requires this pointer.
    * @SINCE_1_0.0
-   * @return a pointer to the Actor implementation that owns this custom actor implementation
+   * @return A pointer to the Actor implementation that owns this custom actor implementation
    */
   Internal::CustomActor* GetOwner() const;
 
   /**
-   * @brief Called when ownership of the CustomActorImpl is passed to a CustomActor.
+   * @brief Returns whether the OnTouchEvent() callback is required.
    * @SINCE_1_0.0
    * @return True if the OnTouchEvent() callback is required.
+   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
    */
   bool RequiresTouchEvents() const;
 
   /**
-   * @brief Called when ownership of the CustomActorImpl is passed to a CustomActor.
+   * @brief Returns whether the OnHoverEvent() callback is required.
    * @SINCE_1_0.0
    * @return True if the OnHoverEvent() callback is required.
+   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
    */
   bool RequiresHoverEvents() const;
 
   /**
-   * @brief Called when ownership of the CustomActorImpl is passed to a CustomActor.
+   * @brief Returns whether the OnWheelEvent() callback is required.
    * @SINCE_1_0.0
    * @return True if the OnWheelEvent() callback is required.
+   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
    */
   bool RequiresWheelEvents() const;
 
   /**
-   * @brief Called when ownership of the CustomActorImpl is passed to a CustomActor.
+   * @brief Returns whether relayout is enabled.
    * @SINCE_1_0.0
-   * @return Return true if relayout is enabled on the custom actor
+   * @return Return true if relayout is enabled on the custom actor.
+   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
    */
   bool IsRelayoutEnabled() const;
 
index fe82c02..e255ba2 100644 (file)
@@ -48,20 +48,20 @@ public:
    * @brief Create an uninitialized CustomActor handle.
    *
    * Only derived versions can be instantiated.
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized CustomActor handle is not allowed.
    * @SINCE_1_0.0
    */
   CustomActor();
 
   /**
-   * @brief Downcast an Object handle to CustomActor.
+   * @brief Downcast a handle to CustomActor handle.
    *
    * If handle points to a CustomActor the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a CustomActor or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a CustomActor or an uninitialized handle
    */
   static CustomActor DownCast( BaseHandle handle );
 
@@ -77,7 +77,7 @@ public:
    * @brief Retrieve the custom actor implementation.
    *
    * @SINCE_1_0.0
-   * @return The implementation.
+   * @return The implementation
    */
   CustomActorImpl& GetImplementation();
 
@@ -85,7 +85,7 @@ public:
    * @brief Retrieve the custom actor implementation.
    *
    * @SINCE_1_0.0
-   * @return The implementation.
+   * @return The implementation
    */
   const CustomActorImpl& GetImplementation() const;
 
@@ -93,8 +93,8 @@ public:
    * @brief Create an initialised CustomActor.
    *
    * @SINCE_1_0.0
-   * @param[in] implementation The implementation for this custom actor.
-   * @return A handle to a newly allocated Dali resource.
+   * @param[in] implementation The implementation for this custom actor
+   * @return A handle to a newly allocated Dali resource
    */
   CustomActor(CustomActorImpl& implementation);
 
@@ -102,7 +102,7 @@ public:
    * @brief Copy constructor
    *
    * @SINCE_1_0.0
-   * @param [in] copy The actor to copy.
+   * @param [in] copy The actor to copy
    */
   CustomActor(const CustomActor& copy);
 
@@ -110,7 +110,8 @@ public:
    * @brief Assignment operator
    *
    * @SINCE_1_0.0
-   * @param [in] rhs The actor to copy.
+   * @param [in] rhs The actor to copy
+   * @return A reference to this
    */
   CustomActor& operator=(const CustomActor& rhs);
 
index 3717007..5546595 100644 (file)
@@ -51,56 +51,56 @@ class ImageActor;
  *
  * If an ImageActor is created without setting size, then the actor takes the size of the image -
  * this is the natural size.
- * Setting a size on the ImageActor, e.g through the SetSize api or through an animation will
+ * Setting a size on the ImageActor, e.g through the @ref Actor::SetSize api or through an animation will
  * stop the natural size being used.
  *
- * If a pixel area is set on an ImageActor with natural size, the actor size will change
- * to match the pixel area. If a pixel area is set on an ImageActor that has had it's size set,
- * then the size doesn't change, and the partial image will be stretched to fill the set size.
- *
- * Clearing the pixel area on an Image actor with natural size will cause the actor to show the
- * whole image again, and will change size back to that of the image.
- *
- * Clearing the pixel area on an Image actor with a set size will cause the actor to show the
- * whole image again, but will not change the image size.
  * @SINCE_1_0.0
+ * @remarks This is an experimental feature and might not be supported in the next release. We do recommend not to use it. Use of ImageActor should be avoided unless shader effects need to be applied.
+ * For general purpose, use Toolkit::ImageView which has much better performance.
+ * @see Toolkit::ImageView
  */
 class DALI_IMPORT_API ImageActor : public Actor
 {
 public:
 
   /**
-   * @DEPRECATED_1_1.11
-   * @brief An enumeration of properties belonging to the ImageActor class.
-   * Properties additional to RenderableActor.
+   * @brief An enumeration of properties belonging to the ImageActor class
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    */
   struct Property
   {
     enum
     {
       /**
-       * @DEPRECATED_1_1.11
        * @brief name "pixelArea",   type Rect<int>
        * @SINCE_1_0.0
+       * @remarks This is an experimental feature and might not be supported in the next release.
+       * We do recommend not to use it.
        */
       PIXEL_AREA = DEFAULT_DERIVED_ACTOR_PROPERTY_START_INDEX,
       /**
        * @DEPRECATED_1_1.11
        * @brief name "style",       type std::string
        * @SINCE_1_0.0
+       * @remarks This is an experimental feature and might not be supported in the next release.
+       * We do recommend not to use it.
        */
       STYLE,
       /**
        * @DEPRECATED_1_1.11
        * @brief name "border",      type Vector4
        * @SINCE_1_0.0
+       * @remarks This is an experimental feature and might not be supported in the next release.
+       * We do recommend not to use it.
        */
       BORDER,
       /**
-       * @DEPRECATED_1_1.11
        * @brief name "image",       type Map {"filename":"", "loadPolicy":...}
        * @SINCE_1_0.0
+       * @remarks This is an experimental feature and might not be supported in the next release.
+       * We do recommend not to use it.
        */
       IMAGE,
     };
@@ -129,6 +129,8 @@ public:
    * is scaled uniformly as the quad is resized.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    */
   enum Style
   {
@@ -136,58 +138,68 @@ public:
      * @DEPRECATED_1_1.11
      * @brief As a simple quad.
      * @SINCE_1_0.0
+     * @remarks This is an experimental feature and might not be supported in the next release.
+     * We do recommend not to use it.
      */
     STYLE_QUAD,
     /**
      * @DEPRECATED_1_1.11
      * @brief As a nine-patch.
      * @SINCE_1_0.0
+     * @remarks This is an experimental feature and might not be supported in the next release.
+     * We do recommend not to use it.
      */
     STYLE_NINE_PATCH,
     /**
      * @DEPRECATED_1_1.11
      * @brief As a nine-patch without center section being rendered.
      * @SINCE_1_0.0
+     * @remarks This is an experimental feature and might not be supported in the next release.
+     * We do recommend not to use it.
      */
     STYLE_NINE_PATCH_NO_CENTER
   };
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Pixel area is relative to the top-left (0,0) of the image.
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    */
   typedef Rect<int> PixelArea;
 
   static const BlendingMode::Type DEFAULT_BLENDING_MODE; ///< default value is BlendingMode::AUTO
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Create an uninitialized ImageActor handle.
    *
-   * This can be initialized with ImageActor::New(...)
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * This can be initialized with ImageActor::New(...).
+   * Calling member functions with an uninitialized ImageActor handle is not allowed.
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    */
   ImageActor();
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Create an empty image actor object.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @return A handle to a newly allocated actor.
    */
   static ImageActor New();
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Create a image actor object.
    *
    * The actor will take the image's natural size unless a custom size
    * is chosen, e.g. via Actor:SetSize().
-   * If the handle is empty, ImageActor will display nothing
+   * If the handle is empty, ImageActor will display nothing.
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[in] image The image to display.
    * @return A handle to a newly allocated actor.
    * @pre ImageActor must be initialized.
@@ -195,13 +207,14 @@ public:
   static ImageActor New(Image image);
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Create a image actor object.
    *
    * The actor will take the image's natural size unless a custom size
-   * is chosen, e.g. via Actor:SetSize()
-   * If the handle is empty, ImageActor will display nothing
+   * is chosen, e.g. via Actor:SetSize().
+   * If the handle is empty, ImageActor will display nothing.
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param [in] image The image to display.
    * @param [in] pixelArea The area of the image to display.
    * This in pixels, relative to the top-left (0,0) of the image.
@@ -211,94 +224,102 @@ public:
   static ImageActor New(Image image, PixelArea pixelArea);
 
   /**
-   * @DEPRECATED_1_1.11
-   * @brief Downcast an Object handle to ImageActor.
+   * @brief Downcast a handle to ImageActor handle.
    *
    *
    * If handle points to a ImageActor the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a ImageActor or an uninitialized handle
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param[in] handle Handle to an object
+   * @return Handle to a ImageActor or an uninitialized handle
    */
   static ImageActor DownCast( BaseHandle handle );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Destructor
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    */
   ~ImageActor();
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Copy constructor
    *
    * @SINCE_1_0.0
-   * @param [in] copy The actor to copy.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] copy The actor to copy
    */
   ImageActor(const ImageActor& copy);
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Assignment operator
    *
    * @SINCE_1_0.0
-   * @param [in] rhs The actor to copy.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] rhs The actor to copy
+   * @return A reference to this
    */
   ImageActor& operator=(const ImageActor& rhs);
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Set the image rendered by the actor.
    *
-   * Set the image rendered by the actor.
    * If actor was already displaying a different image, the old image is dropped and actor may
    * temporarily display nothing. Setting an empty image (handle) causes the current image to be
    * dropped and actor displays nothing.
    * The actor will take the image's natural size unless a custom size
-   * is chosen, e.g. via Actor:SetSize()
+   * is chosen, e.g. via Actor::SetSize().
    *
    * @SINCE_1_0.0
-   * @param [in] image The image to display.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] image The image to display
    * @pre ImageActor must be initialized.
    */
   void SetImage(Image image);
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Retrieve the image rendered by the actor.
    *
-   * If no image is assigned, an empty handle is returned
+   * If no image is assigned, an empty handle is returned.
    * @SINCE_1_0.0
-   * @return The image.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @return The image
    */
   Image GetImage();
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Set a region of the image to display, in pixels.
    *
    * When the image is loaded the actor's size will be reset to the pixelArea,
-   * unless a custom size was chosen, e.g. via Actor:SetSize().
-   * Note! PixelArea should be inside the image data size. It gets clamped by GL
+   * unless a custom size was chosen, e.g. via Actor::SetSize().
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param [in] pixelArea The area of the image to display.
    * This in pixels, relative to the top-left (0,0) of the image.
-   * @pre image must be initialized.
+   * @pre Image must be initialized.
+   * @note PixelArea should be inside the image data size. It gets clamped by GL.
    */
   void SetPixelArea(const PixelArea& pixelArea);
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Retrieve the region of the image to display, in pixels.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @return The pixel area, or a default-constructed area if none was set.
-   * @pre image must be initialized.
+   * @pre Image must be initialized.
    */
   PixelArea GetPixelArea() const;
 
@@ -308,9 +329,10 @@ public:
    * @brief Set how the image is rendered; the default is STYLE_QUAD.
    *
    * @SINCE_1_0.0
-   * @param [in] style The new style.
-   *
-   * @pre image must be initialized.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] style The new style
+   * @pre Image must be initialized.
    * @note The style specified is set (so GetStyle will return what's set) but ignored internally.
    */
   void SetStyle(Style style);
@@ -321,9 +343,10 @@ public:
    * @brief Query how the image is rendered.
    *
    * @SINCE_1_0.0
-   * @return The rendering style.
-   *
-   * @pre image must be initialized.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @return The rendering style
+   * @pre Image must be initialized.
    * @note This just returns the style set by SetStyle. In reality, only STYLE_QUAD is supported.
    */
   Style GetStyle() const;
@@ -331,50 +354,57 @@ public:
   /**
    * @DEPRECATED_1_1.11. Use ImageView instead.
    *
-   * @brief Set the border used with STYLE_NINE_PATCH.
+   * @brief Set the border used with ImageActor::STYLE_NINE_PATCH.
    *
    * The values are in pixels from the left, top, right, and bottom of the image respectively.
-   * i.e. SetNinePatchBorder( Vector4(1,2,3,4) ) sets the left-border to 1, top-border to 2, right-border to 3, and bottom-border to 4 pixels.
+   * i.e. ImageActor::SetNinePatchBorder( Vector4(1,2,3,4) ) sets the left-border to 1, top-border to 2, right-border to 3, and bottom-border to 4 pixels.
    * @SINCE_1_0.0
-   * @param [in] border The new nine-patch border.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] border The new nine-patch border
    */
   void SetNinePatchBorder(const Vector4& border);
 
   /**
    * @DEPRECATED_1_1.11. Use ImageView instead.
    *
-   * @brief Retrieve the border used with STYLE_NINE_PATCH.
+   * @brief Retrieve the border used with ImageActor::STYLE_NINE_PATCH.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @return The nine-patch border.
    */
   Vector4 GetNinePatchBorder() const;
 
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Allows modification of an actors position in the depth sort algorithm.
    *
    * The offset can be altered for each coplanar actor hence allowing an order of painting.
    * @SINCE_1_0.0
-   * @param [in] depthOffset the offset to be given to the actor. Positive values pushing it further back.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] depthOffset The offset to be given to the actor. Positive values pushing it up front.
    * @pre The Actor has been initialized.
+   * @see Layer::Behavior
    */
   void SetSortModifier(float depthOffset);
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Retrieves the offset used to modify an actors position in the depth sort algorithm.
    *
    * The offset can be altered for each coplanar actor hence allowing an order of painting.
    * @SINCE_1_0.0
-   * @return  the offset that has been given to the actor. Positive values pushing it further back.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @return  The offset that has been given to the actor. Positive values pushing it further back.
    * @pre The Actor has been initialized.
+   * @see Layer::Behavior
    */
   float GetSortModifier() const;
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Sets the blending mode.
    *
    * Possible values are: BlendingMode::OFF, BlendingMode::AUTO and BlendingMode::ON. Default is BlendingMode::AUTO.
@@ -388,24 +418,28 @@ public:
    * </ul>
    *
    * @SINCE_1_0.0
-   * @param[in] mode The blending mode.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param[in] mode The blending mode
    */
   void SetBlendMode( BlendingMode::Type mode );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Retrieves the blending mode.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @return The blending mode, one of BlendingMode::OFF, BlendingMode::AUTO or BlendingMode::ON.
    */
   BlendingMode::Type GetBlendMode() const;
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Specify the pixel arithmetic used when the actor is blended.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[in] srcFactorRgba Specifies how the red, green, blue, and alpha source blending factors are computed.
    * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
    * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
@@ -419,10 +453,11 @@ public:
   void SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Specify the pixel arithmetic used when the actor is blended.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[in] srcFactorRgb Specifies how the red, green, and blue source blending factors are computed.
    * The options are BlendingFactor::ZERO, ONE, SRC_COLOR, ONE_MINUS_SRC_COLOR, DST_COLOR, ONE_MINUS_DST_COLOR,
    * SRC_ALPHA, ONE_MINUS_SRC_ALPHA, DST_ALPHA, ONE_MINUS_DST_ALPHA, CONSTANT_COLOR, ONE_MINUS_CONSTANT_COLOR,
@@ -443,69 +478,74 @@ public:
                      BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Query the pixel arithmetic used when the actor is blended.
    *
    * @SINCE_1_0.0
-   * @param[out] srcFactorRgb Specifies how the red, green, blue, and alpha source blending factors are computed.
-   * @param[out] destFactorRgb Specifies how the red, green, blue, and alpha destination blending factors are computed.
-   * @param[out] srcFactorAlpha Specifies how the red, green, blue, and alpha source blending factors are computed.
-   * @param[out] destFactorAlpha Specifies how the red, green, blue, and alpha destination blending factors are computed.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param[out] srcFactorRgb Specifies how the red, green and blue source blending factors are computed.
+   * @param[out] destFactorRgb Specifies how the red, green and blue destination blending factors are computed.
+   * @param[out] srcFactorAlpha Specifies how the alpha source blending factor is computed.
+   * @param[out] destFactorAlpha Specifies how the alpha destination blending factor is computed.
    */
   void GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
                      BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const;
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Specify the equation used when the actor is blended.
    *
-   * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
+   * The options are BlendingEquation::ADD, BlendingEquation::SUBTRACT, or BlendingEquation::REVERSE_SUBTRACT.
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[in] equationRgba The equation used for combining red, green, blue, and alpha components.
    */
   void SetBlendEquation( BlendingEquation::Type equationRgba );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Specify the equation used when the actor is blended.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[in] equationRgb The equation used for combining red, green, and blue components.
    * @param[in] equationAlpha The equation used for combining the alpha component.
-   * The options are BlendingEquation::ADD, SUBTRACT, or REVERSE_SUBTRACT.
+   * The options are BlendingEquation::ADD, BlendingEquation::SUBTRACT, or BlendingEquation::REVERSE_SUBTRACT.
    */
   void SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Query the equation used when the actor is blended.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[out] equationRgb The equation used for combining red, green, and blue components.
    * @param[out] equationAlpha The equation used for combining the alpha component.
    */
   void GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const;
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Specify the color used when the actor is blended; the default is Vector4::ZERO.
    *
    * @SINCE_1_0.0
-   * @param[in] color The blend color.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param[in] color The blend color
    */
   void SetBlendColor( const Vector4& color );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Query the color used when the actor is blended.
    *
    * @SINCE_1_0.0
-   * @return The blend color.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @return The blend color
    */
   const Vector4& GetBlendColor() const;
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Sets the filtering mode.
    *
    * Possible values are: FilterMode::NEAREST and FilterMode::LINEAR. Default is FilterMode::LINEAR.
@@ -516,50 +556,57 @@ public:
    * </ul>
    *
    * @SINCE_1_0.0
-   * @param[in] minFilter The minification filtering mode.
-   * @param[in] magFilter The magnification filtering mode.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param[in] minFilter The minification filtering mode
+   * @param[in] magFilter The magnification filtering mode
    */
   void SetFilterMode( FilterMode::Type minFilter, FilterMode::Type magFilter );
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Retrieves the filtering mode.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @param[out] minFilter The return minification value
    * @param[out] magFilter The return magnification value
    */
   void GetFilterMode( FilterMode::Type& minFilter, FilterMode::Type& magFilter) const;
 
   /**
-   * @DEPRECATED_1_1.11
-   * @brief Sets the shader effect for the RenderableActor.
+   * @brief Sets the shader effect for the ImageActor.
    *
    * Shader effects provide special effects like ripple and bend.
-   * Setting a shader effect removes any shader effect previously set by SetShaderEffect.
+   * Setting a shader effect removes any shader effect previously set by @ref ImageActor::SetShaderEffect.
    * @SINCE_1_0.0
-   * @param [in] effect The shader effect.
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
+   * @param [in] effect The shader effect
    * @pre The actor has been initialized.
-   * @pre effect has been initialized.
+   * @pre Effect has been initialized.
    */
   void SetShaderEffect( ShaderEffect effect );
 
   /**
-   * @DEPRECATED_1_1.11
-   * @brief Retrieve the custom shader effect for the RenderableActor.
+   * @brief Retrieve the custom shader effect for the ImageActor.
+   *
    * If default shader is used an empty handle is returned.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @return The shader effect
    * @pre The Actor has been initialized.
    */
   ShaderEffect GetShaderEffect() const;
 
   /**
-   * @DEPRECATED_1_1.11
    * @brief Removes the current shader effect.
    *
    * @SINCE_1_0.0
+   * @remarks This is an experimental feature and might not be supported in the next release.
+   * We do recommend not to use it.
    * @pre The Actor has been initialized.
    */
   void RemoveShaderEffect();
@@ -572,27 +619,29 @@ public: // Not intended for application developers
 
 
 /**
- * @DEPRECATED_1_1.11
  * @brief Sets the shader effect for all ImageActors in a tree of Actors.
  *
  * @SINCE_1_0.0
- * @param [in] actor root of a tree of actors.
- * @param [in] effect The shader effect.
+ * @remarks This is an experimental feature and might not be supported in the next release.
+ * We do recommend not to use it.
+ * @param [in] actor Root of a tree of actors
+ * @param [in] effect The shader effect
  * @see ImageActor::SetShaderEffect
  *
  */
-DALI_IMPORT_API void SetShaderEffectRecursively( Actor actor, ShaderEffect effect );
+DALI_IMPORT_API void SetShaderEffectRecursively( Dali::Actor actor, Dali::ShaderEffect effect );
 
 /**
- * @DEPRECATED_1_1.11
  * @brief Removes the shader effect from all ImageActors in a tree of Actors.
  *
  * @SINCE_1_0.0
- * @param [in] actor root of a tree of actors.
+ * @remarks This is an experimental feature and might not be supported in the next release.
+ * We do recommend not to use it.
+ * @param [in] actor Root of a tree of actors
  * @see ImageActor::RemoveShaderEffect
  *
  */
-DALI_IMPORT_API void RemoveShaderEffectRecursively( Actor actor );
+DALI_IMPORT_API void RemoveShaderEffectRecursively( Dali::Actor actor );
 
 /**
  * @}
index 559b26e..1e7ad4a 100644 (file)
@@ -38,7 +38,7 @@ class Layer;
 }
 
 /**
- * @brief Rectangle describing area on screen that a layer can draw to.
+ * @brief Rectangle describing area on screen that a layer can draw to
  *
  * @SINCE_1_0.0
  * @see Dali::Layer::SetClippingBox()
@@ -49,13 +49,23 @@ typedef Rect<int> ClippingBox;
  * @brief Layers provide a mechanism for overlaying groups of actors on top of each other.
  *
  * When added to the stage, a layer can be ordered relative to other layers. The bottom
- * layer is at depth zero. The stage provides a default layer for it's children.
+ * layer is at depth zero. The stage provides a default layer for it's children (see Stage::GetRootLayer()).
  *
  * Layered actors inherit position etc. as normal, but are drawn in an order determined
- * by the layers. The depth buffer is cleared before each layer is rendered unless depth
+ * by the layers. In case of LAYER_3D, the depth buffer is cleared before each layer is rendered unless depth
  * test is disabled or there's no need for it based on the layers contents;
  * actors in lower layers cannot obscure actors in higher layers.
  *
+ * A layer has either LAYER_2D or LAYER_3D mode. LAYER_2D has better performance,
+ * the depth test is disabled, and a child actor hides its parent actor.
+ * LAYER_3D uses the depth test, thus a close actor hides a farther one.
+ * LAYER_2D is the default mode and recommended for general cases.
+ * See Layer::Behavior and SetBehavior() for more information.
+ *
+ * Layer is a type of Actor, thus can have parent or children actors.
+ * A layer influences rendering of its all descendant actors,
+ * until another layer appears in the actor tree and manages its own subtree.
+ *
  * If depth test is disabled, there is no performance overhead from clearing the depth buffer.
  *
  * Actions
@@ -73,7 +83,9 @@ public:
 
   /**
    * @brief An enumeration of properties belonging to the Layer class.
+   *
    * Properties additional to Actor.
+   *
    * @SINCE_1_0.0
    */
   struct Property
@@ -95,10 +107,28 @@ public:
   enum Behavior
   {
     /**
-     * @brief Layer doesn't make use of the depth test.
+     * @brief Layer doesn't make use of the depth test (default mode).
      *
      * This mode is expected to have better performance than the 3D mode.
-     * When using this mode any ordering would be with respect to depthIndex property of Renderers.
+     * When using this mode any ordering would be with respect to tree level of each Actor.
+     *
+     * For the following actor tree of the Layer1 object, D and E hide B, B and C hides A,
+     * and F hides C, regardless of their Z positions.
+     * Rendering order between siblings, such as D & E or B & C, is not determined.
+     * If you have two overlapped actors, just make them parent-child, not siblings.
+     *
+     * @code
+     *
+     *     Layer1 (parent)
+     *       |
+     *       A
+     *      / \
+     *     B   C
+     *    / \   \
+     *   D   E   F
+     *
+     * @endcode
+     *
      * @SINCE_1_0.0
      */
     LAYER_2D,
@@ -106,40 +136,50 @@ public:
     /**
      * @brief Layer will use depth test.
      *
-     * When using this mode depth depth test will be used. Opaque renderers are drawn first
-     * and write to the depth buffer. Then transparent renderers are drawn with depth test
-     * enabled but depth write switched off.
+     * When using this mode depth test will be used. A depth clear will happen for each layer,
+     * which means actors in a layer "above" other layers will be rendered in front of actors in
+     * those layers regardless of their Z positions (see Layer::Raise() and Layer::Lower()).
+     * Opaque renderers are drawn first and write to the depth buffer.
+     * Then transparent renderers are drawn with depth test enabled but depth write switched off.
      * Transparent renderers are drawn based on their distance from the camera (painter's algorithm).
      * A renderers DEPTH_INDEX property is used to offset the distance to the camera when ordering transparent renderers.
      * This is useful if you want to define the draw order of two or more transparent renderers that are
      * equal distance from the camera.
+     * Unlike LAYER_2D, parent-child relationship does not affect rendering order at all.
      *
      * @SINCE_1_0.0
+     * @remarks This is an experimental feature. Using 2D UI components of DALi Toolkit
+     * in LAYER_3D mode has not been enoughly tested yet
+     * because they are orginally designed for 2D use cases.
+     * Simple controls such as Toolkit::Control or Toolkit::ImageView might not have any problem with LAYER_3D,
+     * but more complex one like Toolkit::PushButton, you might get unexpected rendered order in LAYER_3D.
+     * Although we'll support 2D controls in LAYER_3D soon, we recommend to use 2D controls with LAYER_2D only at this moment.
+     * Of course, controls rendered in 3D space, such as SpiralLayout of Toolkit::ItemView
+     * (see Toolkit::DefaultItemLayout::New), should be used with LAYER_3D.
      */
     LAYER_3D,
   };
 
-  /*
-   * TREE_DEPTH_MULTIPLIER is used by the rendering sorting algorithm to decide which actors to render first.
-   * For 2D layers, this value will be multiplied to the actor depth in the tree and added to the depth index
-   * to obtain the value which will be used for ordering
+  /**
+   * @brief TREE_DEPTH_MULTIPLIER is used by the rendering sorting algorithm to decide which actors to render first.
+   * @SINCE_1_0.0
    */
   enum TreeDepthMultiplier
   {
     TREE_DEPTH_MULTIPLIER = 10000,
   };
   /**
-   * @brief The sort function type.
+   * @brief The sort function type
    *
    * @SINCE_1_0.0
-   * @param[in] position this is the actor translation from camera.
+   * @param[in] position This is the actor translation from camera.
    */
   typedef float (*SortFunctionType)( const Vector3& position );
 
   /**
    * @brief Create an empty Layer handle.
    *
-   * This can be initialised with Layer::New(...)
+   * This can be initialised with Layer::New(...).
    * @SINCE_1_0.0
    */
   Layer();
@@ -153,13 +193,13 @@ public:
   static Layer New();
 
   /**
-   * @brief Downcast an Object handle to Layer.
+   * @brief Downcast a handle to Layer handle.
    *
    * If handle points to a Layer the downcast produces valid
    * handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a Layer or an uninitialized handle
+   * @param[in] handle Handle to An object
+   * @return Handle to a Layer or an uninitialized handle
    */
   static Layer DownCast( BaseHandle handle );
 
@@ -175,7 +215,7 @@ public:
    * @brief Copy constructor
    *
    * @SINCE_1_0.0
-   * @param [in] copy The actor to copy.
+   * @param [in] copy The actor to copy
    */
   Layer(const Layer& copy);
 
@@ -183,17 +223,18 @@ public:
    * @brief Assignment operator
    *
    * @SINCE_1_0.0
-   * @param [in] rhs The actor to copy.
+   * @param [in] rhs The actor to copy
+   * @return A reference to this
    */
   Layer& operator=(const Layer& rhs);
 
   /**
    * @brief Query the depth of the layer
    *
-   * 0 is bottom most layer, higher number is on top
+   * 0 is bottom most layer, higher number is on top.
    * @SINCE_1_0.0
-   * @return the current depth of the layer.
-   * @pre layer is on the stage
+   * @return The current depth of the layer
+   * @pre Layer is on the stage.
    * If layer is not added to the stage, returns 0.
    */
   unsigned int GetDepth() const;
@@ -202,7 +243,7 @@ public:
    * @brief Increment the depth of the layer.
    *
    * @SINCE_1_0.0
-   * @pre layer is on the stage
+   * @pre Layer is on the stage.
    */
   void Raise();
 
@@ -210,76 +251,76 @@ public:
    * @brief Decrement the depth of the layer.
    *
    * @SINCE_1_0.0
-   * @pre layer is on the stage
+   * @pre Layer is on the stage.
    */
   void Lower();
 
   /**
    * @brief Ensures the layers depth is greater than the target layer.
    *
-   * If the layer already is above target layer its depth is not changed
-   * If the layer was below target, its new depth will be immediately above target
-   * Note! All layers between this layer and target get new depth values
+   * If the layer already is above the target layer its depth is not changed.
+   * If the layer was below target, its new depth will be immediately above target.
    * @SINCE_1_0.0
-   * @param target layer to get above of
-   * @pre layer is on the stage
-   * @pre target layer is on the stage
+   * @param target Layer to get above of
+   * @pre Layer is on the stage.
+   * @pre Target layer is on the stage.
+   * @note All layers between this layer and target get new depth values.
    */
   void RaiseAbove( Layer target );
 
   /**
    * @brief Ensures the layers depth is less than the target layer.
    *
-   * If the layer already is below the layer its depth is not changed
-   * If the layer was above target, its new depth will be immediately below target
-   * Note! All layers between this layer and target get new depth values
+   * If the layer already is below the target layer its depth is not changed.
+   * If the layer was above target, its new depth will be immediately below target.
    * @SINCE_1_0.0
-   * @param target layer to get below of
-   * @pre layer is on the stage
-   * @pre target layer is on the stage
+   * @param target Layer to get below of
+   * @pre Layer is on the stage.
+   * @pre Target layer is on the stage.
+   * @note All layers between this layer and target get new depth values.
    */
   void LowerBelow( Layer target );
 
   /**
    * @brief Raises the layer to the top.
    * @SINCE_1_0.0
-   * @pre layer is on the stage
+   * @pre Layer is on the stage.
    */
   void RaiseToTop();
 
   /**
    * @brief Lowers the layer to the bottom.
    * @SINCE_1_0.0
-   * @pre layer is on the stage
+   * @pre layer is on the stage.
    */
   void LowerToBottom();
 
   /**
    * @brief Moves the layer directly above the given layer.
    *
-   * After the call this layers depth will be immediately above target
-   * Note! All layers between this layer and target get new depth values
+   * After the call this layers depth will be immediately above target.
    * @SINCE_1_0.0
-   * @param target layer to get on top of
-   * @pre layer is on the stage
-   * @pre target layer is on the stage
+   * @param target Layer to get on top of
+   * @pre Layer is on the stage.
+   * @pre Target layer is on the stage.
+   * @note All layers between this layer and target get new depth values.
    */
   void MoveAbove( Layer target );
 
   /**
    * @brief Moves the layer directly below the given layer.
    *
-   * After the call this layers depth will be immediately below target
-   * Note! All layers between this layer and target get new depth values
+   * After the call this layers depth will be immediately below target.
    * @SINCE_1_0.0
-   * @param target layer to get below of
-   * @pre layer is on the stage
-   * @pre target layer is on the stage
+   * @param target Layer to get below of
+   * @pre Layer is on the stage.
+   * @pre Target layer is on the stage.
+   * @note All layers between this layer and target get new depth values.
    */
   void MoveBelow( Layer target );
 
   /**
-   * @brief Set the behavior of the layer
+   * @brief Set the behavior of the layer.
    *
    * @SINCE_1_0.0
    * @param[in] behavior The desired behavior
@@ -287,7 +328,7 @@ public:
   void SetBehavior( Behavior behavior );
 
   /**
-   * @brief Get the behavior of the layer
+   * @brief Get the behavior of the layer.
    *
    * @SINCE_1_0.0
    * @return The behavior of the layer
@@ -318,12 +359,12 @@ public:
    * The contents of the layer will not be visible outside this box, when clipping is
    * enabled. The default clipping box is empty (0,0,0,0) which means everything is clipped.
    * You can only do rectangular clipping using this API in window coordinates.
-   * For other kinds of clipping, @see Dali::Actor::SetDrawMode().
+   * For other kinds of clipping, see Dali::Actor::SetDrawMode().
    * @SINCE_1_0.0
-   * @param [in] x The X-coordinate of the top-left corner of the box.
-   * @param [in] y The Y-coordinate of the top-left corner of the box.
-   * @param [in] width  The width of the box.
-   * @param [in] height The height of the box.
+   * @param [in] x The X-coordinate of the top-left corner of the box
+   * @param [in] y The Y-coordinate of the top-left corner of the box
+   * @param [in] width  The width of the box
+   * @param [in] height The height of the box
    */
   void SetClippingBox(int x, int y, int width, int height);
 
@@ -350,11 +391,11 @@ public:
   /**
    * @brief Whether to disable the depth test.
    *
-   * By default a layer enables depth test if there is more than one opaque actor or if there is one opaque actor and one, or more, transparent actors.
+   * By default a layer enables depth test if there is more than one opaque actor or if there is one opaque actor and one, or more, transparent actors in LAYER_3D mode.
    * However, it's possible to disable the depth test by calling this method.
    *
    * @SINCE_1_0.0
-   * @param[in] disable \e true disables depth test. \e false sets the default behavior.
+   * @param[in] disable \e True disables depth test. \e false sets the default behavior.
    */
   void SetDepthTestDisabled( bool disable );
 
@@ -362,7 +403,7 @@ public:
    * @brief Retrieves whether depth test is disabled.
    *
    * @SINCE_1_0.0
-   * @return \e true if depth test is disabled.
+   * @return \e True if depth test is disabled.
    */
   bool IsDepthTestDisabled() const;
 
@@ -381,7 +422,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in]  function  The sort function pointer
-   * @note If the sort function returns a low number, the actor the data applies to will be
+   * @note If the sort function returns a low number, the actor with the data will be
    * drawn in front of an actor whose data yields a high value from the sort function.
    *
    * @note All child layers use the same sort function.  If a child layer is added to this
@@ -404,7 +445,7 @@ public:
    * @brief Retrieves whether the layer consumes touch (including gestures).
    *
    * @SINCE_1_0.0
-   * @return true if consuming touch, false otherwise.
+   * @return True if consuming touch, false otherwise.
    */
   bool IsTouchConsumed() const;
 
@@ -422,14 +463,14 @@ public:
    * @brief Retrieves whether the layer consumes hover.
    *
    * @SINCE_1_0.0
-   * @return true if consuming hover, false otherwise.
+   * @return True if consuming hover, false otherwise.
    */
   bool IsHoverConsumed() const;
 
 public: // Not intended for application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by Layer::New() methods.
    *
    * @SINCE_1_0.0
    * @param [in] Layer A pointer to a newly allocated Dali resource
index e003cc8..0dee86f 100644 (file)
@@ -33,7 +33,8 @@ namespace FilterMode
 /**
  * @brief Texture filtering mode.
  * @SINCE_1_0.0
- * @see Dali::RenderableActor::SetFilterMode() and Dali::RenderableActor::GetFilterMode()
+ * @remarks This is an experimental feature and might not be supported in the next release.
+ * We do recommend not to use it.
  */
 enum Type
 {
index f0af62e..97ec864 100644 (file)
@@ -35,10 +35,12 @@ namespace Dali
 
 typedef float (*AlphaFunctionPrototype)(float progress); ///< Prototype of an alpha function @SINCE_1_0.0
 
-  /*
+  /**
    * @brief Alpha functions are used in animations to specify the rate of change of the animation parameter over time.
+   *
    * Understanding an animation as a parametric function over time, the alpha function is applied to the parameter of
    * the animation before computing the final animation value.
+   * @SINCE_1_0.0
    */
 class DALI_IMPORT_API AlphaFunction
 {
@@ -78,9 +80,9 @@ public:
    */
   enum Mode
   {
-    BUILTIN_FUNCTION,  //< The user has specified a built-in function
-    CUSTOM_FUNCTION,   //< The user has provided a custom function
-    BEZIER             //< The user has provided the control points of a bezier curve
+    BUILTIN_FUNCTION,  ///< The user has specified a built-in function @SINCE_1_0.0
+    CUSTOM_FUNCTION,   ///< The user has provided a custom function @SINCE_1_0.0
+    BEZIER             ///< The user has provided the control points of a bezier curve @SINCE_1_0.0
   };
 
   /**
@@ -113,6 +115,7 @@ public:
 
   /**
    * @brief Constructor.
+   *
    * Creates a bezier alpha function. The bezier will have the first point at (0,0) and
    * the end point at (1,1).
    * @SINCE_1_0.0
@@ -140,10 +143,10 @@ public:
   AlphaFunctionPrototype GetCustomFunction() const;
 
   /**
-   * @brief Returns the built0in function used by the alpha function
+   * @brief Returns the built-in function used by the alpha function
    * @SINCE_1_0.0
    * @return One of the built-in alpha functions. In case no built-in function
-   * has been specified, it will return AlphaFunction::DEfAULT
+   * has been specified, it will return AlphaFunction::DEFAULT
    */
   BuiltinFunction GetBuiltinFunction() const;
 
index 686d81b..4663f95 100644 (file)
@@ -145,6 +145,11 @@ void Animation::Pause()
   GetImplementation(*this).Pause();
 }
 
+Dali::Animation::State Animation::GetState() const
+{
+  return GetImplementation(*this).GetState();
+}
+
 void Animation::Stop()
 {
   GetImplementation(*this).Stop();
index d562c63..894398d 100644 (file)
@@ -140,9 +140,23 @@ public:
   };
 
   /**
+   * @brief What state the animation is in
+   *
+   * Note: Calling Reset() on this class will NOT reset the animation. It will call BaseHandle::Reset() which drops the object handle.
+   *
+   * @SINCE_1_1.21
+   */
+  enum State
+  {
+    STOPPED,   ///< Animation has stopped @SINCE_1_1.21
+    PLAYING,   ///< The animation is playing @SINCE_1_1.21
+    PAUSED     ///< The animation is paused @SINCE_1_1.21
+  };
+
+  /**
    * @brief Create an uninitialized Animation; this can be initialized with Animation::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized Animation handle is not allowed.
    * @SINCE_1_0.0
    */
   Animation();
@@ -156,19 +170,19 @@ public:
    * @SINCE_1_0.0
    * @param [in] durationSeconds The duration in seconds.
    * @return A handle to a newly allocated Dali resource.
-   * @pre durationSeconds must be greater than zero.
+   * @pre DurationSeconds must be greater than zero.
    */
   static Animation New(float durationSeconds);
 
   /**
-   * @brief Downcast an Object handle to Animation.
+   * @brief Downcast a handle to Animation handle.
    *
    * If handle points to an Animation object the downcast produces
    * valid handle. If not the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a Animation object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a Animation object or an uninitialized handle
    */
   static Animation DownCast( BaseHandle handle );
 
@@ -202,7 +216,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] seconds The duration in seconds.
-   * @pre durationSeconds must be greater than zero.
+   * @pre DurationSeconds must be greater than zero.
    */
   void SetDuration(float seconds);
 
@@ -215,13 +229,13 @@ public:
   float GetDuration() const;
 
   /**
-   * @brief Set whether the animation will loop forever.
+   * @brief Set whether the animation will loop.
    *
    * This function resets the loop count and should not be used with SetLoopCount(int).
    * Setting this parameter does not cause the animation to Play()
    *
    * @SINCE_1_0.0
-   * @param[in] looping If true then the animation will loop forever, if false it will never loop.
+   * @param[in] looping True if the animation will loop.
    */
   void SetLooping(bool looping);
 
@@ -322,12 +336,11 @@ public:
   /*
    * @brief Sets the progress of the animation.
    *
-   * When played, the animation will start from this point.
-   * If playing, the animation will jump to, and continue playing from this point.
-   *
-   * The progress must be in the 0-1 interval or in the play range interval
-   * if defined ( See SetPlayRange ), otherwise, it will be ignored.
+   * The animation will play (or continue playing) from this point. The progress
+   * must be in the 0-1 interval or in the play range interval if defined ( See @ref Animation::SetPlayRange ),
+   * otherwise, it will be ignored.
    *
+   * @SINCE_1_0.0
    * @param[in] progress The new progress as a normalized value between [0,1]
    * or between the play range if specified.
    */
@@ -357,12 +370,13 @@ public:
    * @brief Retrieve the speed factor of the animation
    *
    * @SINCE_1_0.0
-   * @return speed factor
+   * @return Speed factor
    */
   float GetSpeedFactor() const;
 
   /**
    * @brief Set the playing range.
+   *
    * Animation will play between the values specified. Both values ( range.x and range.y ) should be between 0-1,
    * otherwise they will be ignored. If the range provided is not in proper order ( minimum,maximum ), it will be reordered.
    *
@@ -388,7 +402,8 @@ public:
 
   /**
    * @brief Play the animation from a given point.
-   * The progress must be in the 0-1 interval or in the play range interval if defined ( See SetPlayRange ),
+   *
+   * The progress must be in the 0-1 interval or in the play range interval if defined ( See @ref Animation::SetPlayRange ),
    * otherwise, it will be ignored.
    *
    * @SINCE_1_0.0
@@ -403,6 +418,13 @@ public:
   void Pause();
 
   /**
+   * @brief Query the state of the animation.
+   * @SINCE_1_1.21
+   * @return The Animation::State
+   */
+  State GetState() const;
+
+  /**
    * @brief Stop the animation.
    * @SINCE_1_0.0
    */
@@ -420,7 +442,7 @@ public:
    * @brief Connect to this signal to be notified when an Animation's animations have finished.
    *
    * @SINCE_1_0.0
-   * @return A signal object to Connect() with.
+   * @return A signal object to connect with.
    */
   AnimationSignalType& FinishedSignal();
 
@@ -516,8 +538,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object/property to animate.
-   * @param [in] keyFrames The key frames
+   * @param [in] target The target object property to animate.
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    */
   void AnimateBetween(Property target, KeyFrames& keyFrames);
 
@@ -525,8 +547,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object property to animate
-   * @param [in] keyFrames The set of time / value pairs between which to animate.
+   * @param [in] target The target object property to animate
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] interpolation The method used to interpolate between values.
    */
   void AnimateBetween(Property target, KeyFrames& keyFrames, Interpolation interpolation);
@@ -535,8 +557,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object/property to animate.
-   * @param [in] keyFrames The key frames
+   * @param [in] target The target object property to animate.
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] alpha The alpha function to apply.
    */
   void AnimateBetween(Property target, KeyFrames& keyFrames, AlphaFunction alpha);
@@ -545,8 +567,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object property to animate
-   * @param [in] keyFrames The set of time / value pairs between which to animate.
+   * @param [in] target The target object property to animate
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] alpha The alpha function to apply.
    * @param [in] interpolation The method used to interpolate between values.
    */
@@ -556,8 +578,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object/property to animate.
-   * @param [in] keyFrames The key frames
+   * @param [in] target The target object property to animate.
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] period The effect will occur during this time period.
    */
   void AnimateBetween(Property target, KeyFrames& keyFrames, TimePeriod period);
@@ -566,8 +588,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object property to animate
-   * @param [in] keyFrames The set of time / value pairs between which to animate.
+   * @param [in] target The target object property to animate
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] period The effect will occur duing this time period.
    * @param [in] interpolation The method used to interpolate between values.
    */
@@ -577,8 +599,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object/property to animate.
-   * @param [in] keyFrames The key frames
+   * @param [in] target The target object property to animate.
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] alpha The alpha function to apply.
    * @param [in] period The effect will occur during this time period.
    */
@@ -588,8 +610,8 @@ public:
    * @brief Animate a property between keyframes.
    *
    * @SINCE_1_0.0
-   * @param [in] target The target object property to animate
-   * @param [in] keyFrames The set of time / value pairs between which to animate.
+   * @param [in] target The target object property to animate
+   * @param [in] keyFrames The set of time/value pairs between which to animate.
    * @param [in] alpha The alpha function to apply to the overall progress.
    * @param [in] period The effect will occur duing this time period.
    * @param [in] interpolation The method used to interpolate between values.
@@ -600,7 +622,9 @@ public:
   // Actor-specific convenience methods
 
   /**
-   * @brief Animate an actor's position and orientation through a predefined path. The actor will rotate to orient the supplied
+   * @brief Animate an actor's position and orientation through a predefined path.
+   *
+   * The actor will rotate to orient the supplied
    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
    *
    * @SINCE_1_0.0
@@ -611,7 +635,9 @@ public:
   void Animate( Actor actor, Path path, const Vector3& forward );
 
   /**
-   * @brief Animate an actor's position and orientation through a predefined path. The actor will rotate to orient the supplied
+   * @brief Animate an actor's position and orientation through a predefined path.
+   *
+   * The actor will rotate to orient the supplied
    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
    *
    * @SINCE_1_0.0
@@ -623,7 +649,9 @@ public:
   void Animate( Actor actor, Path path, const Vector3& forward, AlphaFunction alpha );
 
   /**
-   * @brief Animate an actor's position and orientation through a predefined path. The actor will rotate to orient the supplied
+   * @brief Animate an actor's position and orientation through a predefined path.
+   *
+   * The actor will rotate to orient the supplied
    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
    *
    * @SINCE_1_0.0
@@ -635,7 +663,9 @@ public:
   void Animate( Actor actor, Path path, const Vector3& forward, TimePeriod period );
 
   /**
-   * @brief Animate an actor's position and orientation through a predefined path. The actor will rotate to orient the supplied
+   * @brief Animate an actor's position and orientation through a predefined path.
+   *
+   * The actor will rotate to orient the supplied
    * forward vector with the path's tangent. If forward is the zero vector then no rotation will happen.
    *
    * @SINCE_1_0.0
@@ -668,7 +698,7 @@ public:
 public: // Not intended for use by Application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods
+   * @brief This constructor is used by Animation::New() methods
    * @SINCE_1_0.0
    * @param [in] animation A pointer to a newly allocated Dali resource
    */
index d04bd05..a3d5850 100644 (file)
@@ -67,7 +67,7 @@ struct DALI_IMPORT_API LocalSource
 struct DALI_IMPORT_API ParentSource
 {
   /**
-   * @brief Create a local constraint source.
+   * @brief Create a parent constraint source.
    *
    * @SINCE_1_0.0
    * @param [in] index The index of a property, provided by the parent of the constrained object.
index 6943dc4..1bf916a 100644 (file)
@@ -292,7 +292,7 @@ public:
   /**
    * @brief Create an uninitialized Constraint; this can be initialized with Constraint::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized Constraint handle is not allowed.
    * @SINCE_1_0.0
    */
   Constraint();
@@ -306,6 +306,7 @@ public:
    * @endcode
    *
    * Create the constraint with this function as follows:
+   *
    * @code
    *   Constraint constraint = Constraint::New< Vector3 >( handle, CONSTRAINING_PROPERTY_INDEX, &MyFunction );
    * @endcode
@@ -337,6 +338,7 @@ public:
    * @endcode
    *
    * Create the constraint with this object as follows:
+   *
    * @code
    *   Constraint constraint = Constraint::New< Vector3 >( handle, CONSTRAINING_PROPERTY_INDEX, MyObject() );
    * @endcode
@@ -369,6 +371,7 @@ public:
    * @endcode
    *
    * Create the constraint with this object as follows:
+   *
    * @code
    *   Constraint constraint = Constraint::New< Vector3 >( handle, CONSTRAINING_PROPERTY_INDEX, MyObject(), &MyObject::MyMethod );
    * @endcode
@@ -426,13 +429,13 @@ public:
   Constraint& operator=( const Constraint& rhs );
 
   /**
-   * @brief Downcast an Object handle to Constraint handle.
+   * @brief Downcast a handle to Constraint handle.
    *
    * If handle points to a Constraint object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in]  baseHandle  to An object
-   * @return handle to a Constraint object or an uninitialized handle
+   * @param[in] baseHandle BaseHandle to an object
+   * @return Handle to a Constraint object or an uninitialized handle
    */
   static Constraint DownCast( BaseHandle baseHandle );
 
@@ -477,9 +480,9 @@ public:
   Dali::Property::Index GetTargetProperty();
 
   /**
-   * @brief Set whether the constraint will "bake" a value when fully-applied.
+   * @brief Set the remove action. Constraint::Bake will "bake" a value when fully-applied.
    *
-   * Otherwise the constrained value will be discarded, when the constraint is removed.
+   * In case of Constraint::Discard, the constrained value will be discarded, when the constraint is removed.
    * The default value is Constraint::Bake.
    * @SINCE_1_0.0
    * @param[in] action The remove-action.
@@ -487,11 +490,10 @@ public:
   void SetRemoveAction( RemoveAction action );
 
   /**
-   * @brief Query whether the constraint will "bake" a value when fully-applied.
+   * @brief Retrieve the remove action that will happen when the constraint is removed.
    *
-   * Otherwise the constrained value will be discarded, when the constraint is removed.
    * @SINCE_1_0.0
-   * @return The apply-action.
+   * @return The remove-action.
    */
   RemoveAction GetRemoveAction() const;
 
@@ -514,7 +516,7 @@ public:
 public: // Not intended for use by Application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods
+   * @brief This constructor is used by Constraint::New() methods
    * @SINCE_1_0.0
    * @param [in] constraint A pointer to a newly allocated Dali resource
    */
index 749548b..13c0485 100644 (file)
@@ -35,9 +35,10 @@ namespace Dali
  */
 
 /**
- * @brief EqualToConstraint
+ * @brief The constraint function that updates the target property with the value of the first source.
  *
- * f(current, property) = property
+ * @e current = <em>input[0]</em>. @e current and <em>input[0]</em> indicate the target property
+ * and the first constraint source (the one added by the first Constraint::AddSource call), respectively.
  * @SINCE_1_0.0
  */
 struct EqualToConstraint
@@ -50,12 +51,11 @@ struct EqualToConstraint
   { }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for float properties
    *
    * @SINCE_1_0.0
    * @param[in, out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( float& current, const PropertyInputContainer& inputs )
   {
@@ -63,12 +63,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for Vector2 properties
    *
    * @SINCE_1_0.0
-   * @param[in] current The current property value, the constrained value is set
+   * @param[in, out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Vector2& current, const PropertyInputContainer& inputs )
   {
@@ -76,12 +75,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for Vector3 properties
    *
    * @SINCE_1_0.0
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Vector3& current, const PropertyInputContainer& inputs )
   {
@@ -89,12 +87,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for Vector4 properties
    *
    * @SINCE_1_0.0
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Vector4& current, const PropertyInputContainer& inputs )
   {
@@ -102,12 +99,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for Quaternion properties
    *
    * @SINCE_1_0.0
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Quaternion& current, const PropertyInputContainer& inputs )
   {
@@ -115,12 +111,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for Matrix3 properties
    *
    * @SINCE_1_0.0
    * @param[in,out] current The current property value
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Matrix3& current, const PropertyInputContainer& inputs )
   {
@@ -128,12 +123,11 @@ struct EqualToConstraint
   }
 
   /**
-   * @brief override functor for float properties
+   * @brief Override functor for Matrix properties
    *
    * @SINCE_1_0.0
    * @param[in,out] current The current property value, the constrained value is set
    * @param[in] inputs Contains the property to copy
-   * @return The copy of the input property
    */
   void operator()( Matrix& current, const PropertyInputContainer& inputs )
   {
@@ -143,9 +137,12 @@ struct EqualToConstraint
 };
 
 /**
- * @brief RelativeToConstraint for Vector3 properties
+ * @brief The constraint function that updates the target property with the value of the first source
+ * multiplied by scale parameter (for Vector3 properties).
  *
- * current = property * scale
+ * @e current = <em>input[0]</em> * @e scale. @e current, <em>input[0]</em>, and @e scale
+ * indicate the target property, the first constraint source, and the scale parameter, respectively.
+ * * implies element-wise multiplication.
  * @SINCE_1_0.0
  */
 struct RelativeToConstraint
@@ -153,6 +150,7 @@ struct RelativeToConstraint
   /**
    * @brief Constructor.
    * @SINCE_1_0.0
+   * @param[in] scale Scale factor
    */
   RelativeToConstraint( float scale )
   : mScale( scale, scale, scale ) { }
@@ -160,6 +158,7 @@ struct RelativeToConstraint
   /**
    * @brief Constructor.
    * @SINCE_1_0.0
+   * @param[in] scale Scale factor
    */
   RelativeToConstraint( const Vector3& scale )
   : mScale( scale ) { }
@@ -167,6 +166,8 @@ struct RelativeToConstraint
   /**
    * @brief Functor.
    * @SINCE_1_0.0
+   * @param[in,out] current The current property value (vector3 property * scale factor).
+   * @param[in] inputs Property container for current property calculation
    */
   void operator()( Vector3& current, const PropertyInputContainer& inputs )
   {
@@ -177,7 +178,11 @@ struct RelativeToConstraint
 };
 
 /**
- * @brief RelativeToConstraint for float properties
+ * @brief The constraint function that updates the target property with the value of the first source
+ * multiplied by scale parameter (for float properties).
+ *
+ * @e current = <em>input[0]</em> * @e scale. @e current, <em>input[0]</em>, and @e scale
+ * indicate the target property, the first constraint source, and the scale parameter, respectively.
  * @SINCE_1_0.0
  */
 struct RelativeToConstraintFloat
@@ -185,6 +190,7 @@ struct RelativeToConstraintFloat
   /**
    * @brief Constructor.
    * @SINCE_1_0.0
+   * @param[in] scale Scale factor
    */
   RelativeToConstraintFloat( float scale )
   : mScale( scale ) { }
@@ -192,6 +198,8 @@ struct RelativeToConstraintFloat
   /**
    * @brief Functor.
    * @SINCE_1_0.0
+   * @param[in,out] current The current property value (float property * scale factor).
+   * @param[in] inputs Property container for current property calculation
    */
   void operator()( float& current, const PropertyInputContainer& inputs )
   {
@@ -211,10 +219,9 @@ struct RelativeToConstraintFloat
  *
  * @SINCE_1_0.0
  * @param[in,out] current The current orientation property value, the constrained value is set.
- * @param[in] inputs Contains the World position of the target, the World position of the camera, and the world orientation of the target
- * @return The orientation of the camera
+ * @param[in] inputs Contains the world position of the target, the world position of the camera, and the world orientation of the target
  */
-inline void LookAt( Quaternion& current, const PropertyInputContainer& inputs )
+inline void LookAt( Dali::Quaternion& current, const Dali::PropertyInputContainer& inputs )
 {
   const PropertyInput& targetPosition( *inputs[0] );
   const PropertyInput& cameraPosition( *inputs[1] );
index 67a1e2a..c688e05 100644 (file)
@@ -49,29 +49,29 @@ class DALI_IMPORT_API KeyFrames : public BaseHandle
 {
 public:
   /**
-   * @brief Create an initialized KeyFrame handle.
+   * @brief Create an initialized KeyFrames handle.
    *
    * @SINCE_1_0.0
-   * @return a handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource.
    */
   static KeyFrames New();
 
   /**
-   * @brief Downcast an Object handle to KeyFrames handle.
+   * @brief Downcast a handle to KeyFrames handle.
    *
    * If handle points to a KeyFrames object the downcast produces
    * valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a KeyFrames object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a KeyFrames object or an uninitialized handle
    */
   static KeyFrames DownCast( BaseHandle handle );
 
   /**
    * @brief Create an uninitialized KeyFrame handle.
    *
-   * This can be initialized with KeyFrame::New(). Calling member
-   * functions with an uninitialized Dali::Object is not allowed.
+   * This can be initialized with KeyFrame::New().
+   * Calling member functions with an uninitialized KeyFrames handle is not allowed.
    * @SINCE_1_0.0
    */
   KeyFrames();
@@ -115,7 +115,7 @@ public:
    *
    * The key frames should be added in time order.
    * @SINCE_1_0.0
-   * @param[in] progress A value between 0.0 and 1.0.
+   * @param[in] progress A progress value between 0.0 and 1.0.
    * @param[in] value A value.
    */
   void Add(float progress, Property::Value value);
@@ -125,7 +125,7 @@ public:
    *
    * The key frames should be added in time order.
    * @SINCE_1_0.0
-   * @param[in] progress A value between 0.0 and 1.0.
+   * @param[in] progress A progress value between 0.0 and 1.0.
    * @param[in] value A value.
    * @param[in] alpha The alpha function used to blend to the next keyframe
    */
@@ -134,7 +134,7 @@ public:
 
 public: // Not intended for application developers
   /**
-   * @brief This constructor is used by Dali::New() methods.
+   * @brief This constructor is used by KeyFrames::New() methods.
    *
    * @SINCE_1_0.0
    * @param[in] keyFrames A pointer to an internal KeyFrame resource
index 99a9936..173f839 100644 (file)
@@ -38,12 +38,20 @@ namespace Internal DALI_INTERNAL
 }
 
 /**
- * @brief
+ * @brief LinearConstrainer applies constraints to objects given a linear map.
  *
- * LinearConstrainer applies constraints to objects given a linear map.
  * A linear map is defined by a set of value-progress pairs.
  * Progress must be normalized between [0,1]. If no progress is defined, the values
  * are considered to be equally spaced along the x axis.
+ *
+ * Basically, a linear constrainer allows constraining a property to another property
+ * with the changes mapped over a certain range. For example, if you want to change the
+ * opacity of an actor depending on its position along the X-axis, so that it’s fully
+ * transparent on the edges and fully opaque in the center. To do this, an array with
+ * values, 0.0f, 1.0f, 0.0f, is created, which means that there are 3 control points.
+ * You can add as many control points as you want, but they will be linearly spaced.
+ * Then you can apply the linear constrainer by using the alpha of the actor as the
+ * target and the source as the actor’s position.
  * @SINCE_1_0.0
  */
 class DALI_IMPORT_API LinearConstrainer : public Handle
@@ -67,26 +75,26 @@ public:
    * @brief Create an initialized LinearConstrainer handle.
    *
    * @SINCE_1_0.0
-   * @return a handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource.
    */
   static LinearConstrainer New();
 
   /**
-   * @brief Downcast an Object handle to LinearConstrainer handle.
+   * @brief Downcast a handle to LinearConstrainer handle.
    *
    * If handle points to a LinearConstrainer object the downcast produces
    * valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a LinearConstrainer object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a LinearConstrainer object or an uninitialized handle
    */
   static LinearConstrainer DownCast( BaseHandle handle );
 
   /**
    * @brief Create an uninitialized LinearConstrainer handle.
    *
-   * This can be initialized with PathConstrainer::New(). Calling member
-   * functions with an uninitialized Dali::Object is not allowed.
+   * This can be initialized with @ref LinearConstrainer::New
+   * Calling member functions with an uninitialized LinearConstrainer handle is not allowed.
    * @SINCE_1_0.0
    */
   LinearConstrainer();
@@ -121,9 +129,9 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] target Property to be constrained
-   * @param[in] source Property used as parameter for the path
+   * @param[in] source Property used as parameter for the linear map
    * @param[in] range The range of values in the source property which will be mapped to [0,1]
-   * @param[in] wrap Wrapping domain. Source property will be wrapped in the domain [wrap.x,wrap.y] before mapping to [0,1]
+   * @param[in] wrap Wrapping domain. Source property will be wrapped in the domain [wrap.x,wrap.y] before mapping to [0,1]. See cfloat.h for FLT_MAX
    */
   void Apply( Dali::Property target, Dali::Property source, const Vector2& range, const Vector2& wrap = Vector2(-FLT_MAX, FLT_MAX) );
 
@@ -137,12 +145,12 @@ public:
 
 public: // Not intended for application developers
   /**
-   * @brief This constructor is used by Dali::New() methods.
+   * @brief This constructor is used by LinearConstrainer::New() methods.
    *
    * @SINCE_1_0.0
-   * @param[in] pathConstrainer A pointer to an internal PathConstrainer resource
+   * @param[in] internal A pointer to an internal LinearConstrainer resource
    */
-  explicit DALI_INTERNAL LinearConstrainer(Internal::LinearConstrainer* pathConstrainer);
+  explicit DALI_INTERNAL LinearConstrainer(Internal::LinearConstrainer* internal);
 };
 
 /**
index 30f6cda..1646acb 100644 (file)
@@ -37,7 +37,7 @@ class Path;
 /**
  * @brief A 3D parametric curve
  *
- * Paths can be used to animate position and orientation of actors using Dali::Animate( Actor, Path, ... )
+ * Paths can be used to animate position and orientation of actors using Dali::Animate()
  *
  * @SINCE_1_0.0
  */
@@ -62,26 +62,26 @@ public:
    * @brief Create an initialized Path handle.
    *
    * @SINCE_1_0.0
-   * @return a handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource.
    */
   static Path New();
 
   /**
-   * @brief Downcast an Object handle to Path handle.
+   * @brief Downcast a handle to Path handle.
    *
-   * If handle points to a KeyFrames object the downcast produces
+   * If handle points to a Path object the downcast produces
    * valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a Path object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a Path object or an uninitialized handle
    */
   static Path DownCast( BaseHandle handle );
 
   /**
    * @brief Create an uninitialized Path handle.
    *
-   * This can be initialized with Path::New(). Calling member
-   * functions with an uninitialized Dali::Object is not allowed.
+   * This can be initialized with Path::New().
+   * Calling member functions with an uninitialized Path handle is not allowed.
    * @SINCE_1_0.0
    */
   Path();
@@ -133,8 +133,8 @@ public:
    * The generating algorithm is as follows:
    * For a given knot point K[N], find the vector that bisects K[N-1],[N] and [N],[N+1].
    * Calculate the tangent vector by taking the normal of this bisector.
-   * The in control point is the length of the preceding segment back along this bisector multiplied by the curvature
-   * The out control point is the length of the succeeding segment forward along this bisector multiplied by the curvature
+   * The in control point is the length of the preceding segment back along this bisector multiplied by the curvature.
+   * The out control point is the length of the succeeding segment forward along this bisector multiplied by the curvature.
    *
    * @SINCE_1_0.0
    * @param[in] curvature The curvature of the spline. 0 gives straight lines between the knots,
@@ -185,7 +185,7 @@ public:
 
 public: // Not intended for application developers
   /**
-   * @brief This constructor is used by Dali::New() methods.
+   * @brief This constructor is used by Path::New() methods.
    *
    * @SINCE_1_0.0
    * @param[in] path A pointer to an internal path resource
index b119bdf..8879ce0 100644 (file)
@@ -118,8 +118,8 @@ public:
    * Will always display a backtrace when raised in a debug build.
    *
    * @SINCE_1_0.0
-   * @param[in] location  - the location of the assertion
-   * @param[in] condition The assertion condition
+   * @param[in] location The location of the assertion
+   * @param[in] condition The assertion condition
    */
   DaliException( const char* location, const char* condition );
 
index 8f60b9f..30857f7 100644 (file)
@@ -54,7 +54,7 @@ namespace Dali
  * @brief Base class to handle the memory of simple vector.
  *
  * Memory layout is such that it has two std::size_t to hold the count
- * and capacity of the vector. mData is adjusted so that it points to the
+ * and capacity of the vector. VectorBase::mData is adjusted so that it points to the
  * beginning of the first real item so that iterating the items is quick.
  * @SINCE_1_0.0
  */
@@ -85,7 +85,7 @@ protected: // Construction
 public: // API
 
   /**
-   * @brief This method is inlined as its needed frequently for End() iterator.
+   * @brief This method is inlined as its needed frequently for Vector::End() iterator.
    *
    * @SINCE_1_0.0
    * @return The count of elements in this vector.
@@ -102,6 +102,7 @@ public: // API
   }
 
   /**
+   * @brief Gets the count of elements in this vector.
    * @SINCE_1_0.0
    * @return The count of elements in this vector.
    */
@@ -120,6 +121,7 @@ public: // API
   }
 
   /**
+   * @brief Gets the capacity of this vector.
    * @SINCE_1_0.0
    * @return The capacity of this vector.
    */
@@ -139,7 +141,7 @@ protected: // for Derived classes
    * @brief Helper to set the count.
    *
    * @SINCE_1_0.0
-   * @param count Number of elements in the vector.
+   * @param[in] count Number of elements in the vector.
    */
   void SetCount( SizeType count );
 
@@ -147,8 +149,8 @@ protected: // for Derived classes
    * @brief Reserve space in the vector.
    *
    * @SINCE_1_0.0
-   * @param count of elements to reserve.
-   * @param elementSize of a single element.
+   * @param[in] count Count of elements to reserve.
+   * @param[in] elementSize Size of a single element.
    */
   void Reserve( SizeType count, SizeType elementSize );
 
@@ -156,8 +158,8 @@ protected: // for Derived classes
    * @brief Copy a vector.
    *
    * @SINCE_1_0.0
-   * @param vector Vector to copy from.
-   * @param elementSize of a single element.
+   * @param[in] vector Vector to copy from.
+   * @param[in] elementSize Size of a single element.
    */
   void Copy( const VectorBase& vector, SizeType elementSize );
 
@@ -165,7 +167,7 @@ protected: // for Derived classes
    * @brief Swap the contents of two vectors.
    *
    * @SINCE_1_0.0
-   * @param vector Vector to swap with.
+   * @param[in] vector Vector to swap with.
    */
   void Swap( VectorBase& vector );
 
@@ -174,9 +176,9 @@ protected: // for Derived classes
    *
    * Does not change capacity.
    * @SINCE_1_0.0
-   * @param address to erase from.
-   * @param elementSize to erase.
-   * @pre last element cannot be erased as there is nothing to move.
+   * @param[in] address Adress to erase from.
+   * @param[in] elementSize Size to erase.
+   * @pre Last element cannot be erased as there is nothing to move.
    */
   void Erase( char* address, SizeType elementSize );
 
@@ -188,7 +190,7 @@ protected: // for Derived classes
    * @param[in] first Address to the first element to be erased.
    * @param[in] last Address to the last element to be erased.
    * @param[in] elementSize Size of one of the elements to be erased.
-   * @return address pointing to the next element of the last one.
+   * @return Address pointing to the next element of the last one.
    */
   char* Erase( char* first, char* last, SizeType elementSize );
 
@@ -247,8 +249,8 @@ protected: // API for deriving classes
    * @brief Copy vector contents.
    *
    * @SINCE_1_0.0
-   * @param rhs to copy from.
-   * @param elementSize of the content.
+   * @param[in] rhs VectorBase object to copy from.
+   * @param[in] elementSize Size of the content.
    */
   void Copy( const VectorBase& rhs, SizeType elementSize )
   {
@@ -266,8 +268,8 @@ protected: // API for deriving classes
    * @brief Reserve space in the vector.
    *
    * @SINCE_1_0.0
-   * @param count of elements to reserve.
-   * @param elementSize of a single element.
+   * @param[in] count Count of elements to reserve.
+   * @param[in] elementSize Size of a single element.
    */
   void Reserve( SizeType count, SizeType elementSize )
   {
@@ -278,8 +280,8 @@ protected: // API for deriving classes
    * @brief Resize the vector. Does not change capacity.
    *
    * @SINCE_1_0.0
-   * @param count to resize to.
-   * @param elementSize of a single element.
+   * @param[in] count Count to resize to.
+   * @param[in] elementSize Size of a single element.
    */
   void Resize( SizeType count, SizeType elementSize )
   {
@@ -314,8 +316,8 @@ protected: // API for deriving classes
    * @brief Erase an element. Does not change capacity.
    *
    * @SINCE_1_0.0
-   * @param address to erase from.
-   * @param elementSize to erase.
+   * @param[in] address Address to erase from.
+   * @param[in] elementSize Size to erase.
    */
   void Erase( char* address, SizeType elementSize )
   {
@@ -329,7 +331,7 @@ protected: // API for deriving classes
    * @param[in] first Address to the first element to be erased.
    * @param[in] last Address to the last element to be erased.
    * @param[in] elementSize Size of one of the elements to be erased.
-   * @return address pointing to the next element of the last one.
+   * @return Address pointing to the next element of the last one.
    */
   char* Erase( char* first, char* last, SizeType elementSize )
   {
@@ -408,10 +410,10 @@ public: // API
    * @brief Type definitions.
    * @SINCE_1_0.0
    */
-  typedef VectorBase::SizeType SizeType;
+  typedef VectorBase::SizeType SizeType; ///< Size type @SINCE_1_0.0
   typedef T* Iterator;  ///< Most simple Iterator is a pointer @SINCE_1_0.0
-  typedef const T* ConstIterator;
-  typedef T  ItemType;
+  typedef const T* ConstIterator; ///< Const iterator @SINCE_1_0.0
+  typedef T  ItemType; ///< Item type @SINCE_1_0.0
 
   enum
   {
@@ -438,7 +440,7 @@ public: // API
    * @brief Copy constructor.
    *
    * @SINCE_1_0.0
-   * @param vector Vector to copy from.
+   * @param[in] vector Vector to copy from.
    */
   Vector( const Vector& vector )
   {
@@ -450,8 +452,8 @@ public: // API
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param  vector Vector to assign from.
-   * @return reference to self for chaining.
+   * @param[in]  vector Vector to assign from.
+   * @return Reference to self for chaining.
    */
   Vector& operator=( const Vector& vector )
   {
@@ -463,6 +465,7 @@ public: // API
   }
 
   /**
+   * @brief Iterator to the beginning of the data.
    * @SINCE_1_0.0
    * @return Iterator to the beginning of the data.
    */
@@ -473,6 +476,7 @@ public: // API
   }
 
   /**
+   * @brief Iterator to the end of the data (one past last element).
    * @SINCE_1_0.0
    * @return Iterator to the end of the data (one past last element).
    */
@@ -484,10 +488,11 @@ public: // API
   }
 
   /**
+   * @brief Subscript operator.
    * @SINCE_1_0.0
-   * @param  index of the element.
-   * @return reference to the element for given index.
-   * @pre index must be in the vector's range.
+   * @param[in]  index Index of the element.
+   * @return Reference to the element for given index.
+   * @pre Index must be in the vector's range.
    */
   ItemType& operator[]( SizeType index )
   {
@@ -496,8 +501,9 @@ public: // API
   }
 
   /**
+   * @brief Subscript operator.
    * @SINCE_1_0.0
-   * @param  index of the element.
+   * @param[in]  index of the element.
    * @return reference to the element for given index.
    * @pre index must be in the vector's range.
    */
@@ -518,7 +524,7 @@ public: // API
    * become invalid.
    *
    * @SINCE_1_0.0
-   * @param[in] element to be added.
+   * @param[in] element Element to be added.
    */
   void PushBack( const ItemType& element )
   {
@@ -547,7 +553,7 @@ public: // API
    * @pre Iterator at must be in the vector's range ( Vector::Begin(), Vector::End() ).
    *
    * @param[in] at Iterator where to insert the elements into the vector.
-   * @param[in] element to be added.
+   * @param[in] element An element to be added.
    *@SINCE_1_0.0
    */
   void Insert( Iterator at, const ItemType& element )
@@ -601,7 +607,7 @@ public: // API
    *
    * Reserving less than current Capacity is a no-op.
    * @SINCE_1_0.0
-   * @param count of elements to reserve.
+   * @param[in] count Count of elements to reserve.
    */
   void Reserve( SizeType count )
   {
@@ -612,7 +618,7 @@ public: // API
    * @brief Resize the vector. Does not change capacity.
    *
    * @SINCE_1_0.0
-   * @param count to resize to.
+   * @param[in] count Count to resize to.
    */
   void Resize( SizeType count )
   {
@@ -624,8 +630,8 @@ public: // API
    * @brief Resize the vector. Does not change capacity.
    *
    * @SINCE_1_0.0
-   * @param count to resize to.
-   * @param item to insert to the new indices.
+   * @param[in] count Count to resize to.
+   * @param[in] item An item to insert to the new indices.
    */
   void Resize( SizeType count, const ItemType& item )
   {
@@ -653,7 +659,7 @@ public: // API
    * Does not change capacity. Other elements get moved.
    *
    * @SINCE_1_0.0
-   * @param iterator Iterator pointing to item to remove.
+   * @param[in] iterator Iterator pointing to item to remove.
    * @return Iterator pointing to next element.
    * @pre Iterator \e iterator must be within the vector's range ( Vector::Begin(), Vector::End() - 1 ).
    *
@@ -720,7 +726,7 @@ public: // API
    * this in case order does not matter. Does not change capacity.
    *
    * @SINCE_1_0.0
-   * @param iterator Iterator pointing to item to remove.
+   * @param[in] iterator Iterator pointing to item to remove.
    * @pre Iterator \e iterator must be in the vector's range ( Vector::Begin(), Vector::End() - 1 ).
    *
    */
@@ -740,7 +746,7 @@ public: // API
    * @brief Swap the contents of two vectors.
    *
    * @SINCE_1_0.0
-   * @param vector Vector to swap with.
+   * @param[in] vector Vector to swap with.
    */
   void Swap( Vector& vector )
   {
index a21a982..9a775aa 100644 (file)
@@ -31,8 +31,8 @@ namespace Dali
 /**
  * @brief Templated intrusive pointer class
  *
- * Uses the Dali:Refobject type supply actual reference counting
- * The object is responsible for destroying itself
+ * Uses the Dali:RefObject type with actual reference counting.
+ * The object is responsible for destroying itself.
  * @SINCE_1_0.0
  */
 template<typename T>
@@ -51,7 +51,7 @@ public:
    * @brief Constructor to attach existing object.
    *
    * @SINCE_1_0.0
-   * @param p pointer to object,
+   * @param[in] p Pointer to object,
    */
   IntrusivePtr( T* p ) : mPtr( p )
   {
@@ -65,8 +65,8 @@ public:
    * @brief Copy constructor.
    *
    * @SINCE_1_0.0
-   * @param rhs const reference to an IntrusivePtr
-   * @tparam U reference counter object type
+   * @param[in] rhs Const reference to an IntrusivePtr
+   * @tparam U Reference counter object type
    */
   template<typename U>
   IntrusivePtr( IntrusivePtr<U> const& rhs ) : mPtr( rhs.Get() )
@@ -107,7 +107,7 @@ public:
    * @brief Get pointer to reference counted object.
    *
    * @SINCE_1_0.0
-   * @return pointer to reference counted object
+   * @return Pointer to reference counted object
    */
   T* Get() const
   {
@@ -118,7 +118,7 @@ public:
    * @brief Pointer operator override.
    *
    * @SINCE_1_0.0
-   * @return pointer to reference counted object
+   * @return Pointer to reference counted object
    */
   T* operator->() const
   {
@@ -129,7 +129,7 @@ public:
    * @brief Dereference operator override.
    *
    * @SINCE_1_0.0
-   * @return reference to reference counted object
+   * @return Reference to reference counted object
    */
   T& operator*() const
   {
@@ -140,8 +140,8 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param rhs const reference to intrusive pointer
-   * @return reference to reference counted object
+   * @param rhs Const reference to intrusive pointer
+   * @return Reference to reference counted object
    */
   IntrusivePtr& operator=( IntrusivePtr const& rhs )
   {
@@ -153,8 +153,8 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param rhs pointer to object to wrap
-   * @return A reference to this object
+   * @param rhs Pointer to object to wrap
+   * @return A Reference to this object
    */
   IntrusivePtr& operator=( T* rhs )
   {
@@ -175,7 +175,7 @@ public:
    * @brief Reset intrusive pointer with reference counted object.
    *
    * @SINCE_1_0.0
-   * @param rhs pointer to object
+   * @param[in] rhs Pointer to object
    */
   void Reset( T* rhs )
   {
@@ -241,9 +241,9 @@ private:
  * @brief Comparison overrides of objects wrapped by intrusive pointers.
  *
  * @SINCE_1_0.0
- * @param lhs intrusive pointer to compare with
- * @param rhs intrusive pointer to compare against
- * @return true if the pointers point at the same object
+ * @param[in] lhs Intrusive pointer to compare with
+ * @param[in] rhs Intrusive pointer to compare against
+ * @return True if the pointers point at the same object
  */
 template<typename T, typename U>
 inline bool operator==( IntrusivePtr<T>const& lhs, IntrusivePtr<U>const& rhs )
@@ -255,9 +255,9 @@ inline bool operator==( IntrusivePtr<T>const& lhs, IntrusivePtr<U>const& rhs )
  * @brief Comparison overrides of objects wrapped by intrusive pointers.
  *
  * @SINCE_1_0.0
- * @param lhs intrusive pointer to compare with
- * @param rhs intrusive pointer to compare against
- * @return true if the pointers point at different objects
+ * @param[in] lhs Intrusive pointer to compare with
+ * @param[in] rhs Intrusive pointer to compare against
+ * @return True if the pointers point at different objects
  */
 template<typename T, typename U>
 inline bool operator!=( IntrusivePtr<T>const& lhs, IntrusivePtr<U>const &rhs)
@@ -269,9 +269,9 @@ inline bool operator!=( IntrusivePtr<T>const& lhs, IntrusivePtr<U>const &rhs)
  * @brief Comparison overrides of objects wrapped by intrusive pointers
  *
  * @SINCE_1_0.0
- * @param lhs intrusive pointer to compare with
- * @param rhs object to compare against
- * @return true if the intrusive pointer points at the specified object
+ * @param[in] lhs Intrusive pointer to compare with
+ * @param[in] rhs Object to compare against
+ * @return True if the intrusive pointer points at the specified object
  */
 template<typename T, typename U>
 inline bool operator==( IntrusivePtr<T>const& lhs, U* rhs )
@@ -283,9 +283,9 @@ inline bool operator==( IntrusivePtr<T>const& lhs, U* rhs )
  * @brief Comparison overrides of objects wrapped by intrusive pointers.
  *
  * @SINCE_1_0.0
- * @param lhs intrusive pointer to compare with
- * @param rhs intrusive pointer to compare against
- * @return true if the intrusive pointer doesn't point at the specified object
+ * @param[in] lhs Intrusive pointer to compare with
+ * @param[in] rhs Intrusive pointer to compare against
+ * @return True if the intrusive pointer doesn't point at the specified object
  */
 template<typename T, typename U>
 inline bool operator!=( IntrusivePtr<T>const& lhs, U* rhs )
@@ -297,9 +297,9 @@ inline bool operator!=( IntrusivePtr<T>const& lhs, U* rhs )
  * @brief Comparison overrides of objects wrapped by intrusive pointers
  *
  * @SINCE_1_0.0
- * @param lhs object to compare with
- * @param rhs intrusive pointer to compare against
- * @return true if the intrusive pointer points at the specified object
+ * @param[in] lhs Object to compare with
+ * @param[in] rhs Intrusive pointer to compare against
+ * @return True if the intrusive pointer points at the specified object
  */
 template<typename T, typename U>
 inline bool operator==( T* lhs, IntrusivePtr<U>const& rhs )
@@ -311,9 +311,9 @@ inline bool operator==( T* lhs, IntrusivePtr<U>const& rhs )
  * @brief Comparison overrides of objects wrapped by intrusive pointers
  *
  * @SINCE_1_0.0
- * @param lhs object to compare with
- * @param rhs intrusive pointer to compare against
- * @return true if the intrusive pointer doesn't point at the specified object
+ * @param[in] lhs Object to compare with
+ * @param[in] rhs Intrusive pointer to compare against
+ * @return True if the intrusive pointer doesn't point at the specified object
  */
 template<typename T, typename U>
 inline bool operator!=( T* lhs, IntrusivePtr<U>const& rhs )
index c782456..dab6243 100644 (file)
@@ -88,7 +88,7 @@ public:
    * @brief Get the current Stage.
    *
    * @SINCE_1_0.0
-   * @return The current stage or an empty handle if Core has not been created or has been already destroyed.
+   * @return The current stage or an empty handle if the internal core has not been created or has been already destroyed.
    */
   static Stage GetCurrent();
 
@@ -186,7 +186,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] depth The depth.
    * @return The layer found at the given depth.
-   * @pre depth is less than layer count; see GetLayerCount().
+   * @pre Depth is less than layer count; see GetLayerCount().
    */
   Layer GetLayer(unsigned int depth) const;
 
@@ -220,7 +220,7 @@ public:
    * @brief Retrieve the DPI of the display device to which the stage is connected.
    *
    * @SINCE_1_0.0
-   * @return the horizontal and vertical DPI
+   * @return The horizontal and vertical DPI
    */
   Vector2 GetDpi() const;
 
@@ -240,7 +240,7 @@ public:
    * By default Dali will stop rendering when no Actor positions are being set, and when no animations are running etc.
    * This method is useful to force screen refreshes e.g. when updating a NativeImage.
    * @SINCE_1_0.0
-   * @param durationSeconds to keep rendering, 0 means render at least one more frame
+   * @param[in] durationSeconds Time to keep rendering, 0 means render at least one more frame
    */
   void KeepRendering( float durationSeconds );
 
@@ -302,7 +302,7 @@ public:
    * If the application is responsible for handling context loss, it should listen to
    * this signal and tear down UI components when recieved.
    * @SINCE_1_0.0
-   * @return The ContextLost signal to connect to.
+   * @return The context lost signal to connect to.
    */
   ContextStatusSignal& ContextLostSignal();
 
@@ -313,12 +313,14 @@ public:
    * If the application is responsible for handling context loss, it should listen to
    * this signal and rebuild UI components on receipt.
    * @SINCE_1_0.0
-   * @return The ContextRegained signal to connect to.
+   * @return The context regained signal to connect to.
    */
   ContextStatusSignal& ContextRegainedSignal();
 
   /**
-   * @brief This signal is emitted after the initial scene is created. It will be triggered after the
+   * @brief This signal is emitted after the initial scene is created.
+   *
+   * It will be triggered after the
    * application init signal.
    *
    * A callback of the following type may be connected:
@@ -333,7 +335,7 @@ public:
 public: // Not intended for application developers
 
   /**
-   * @brief This constructor is used by Dali GetCurrent() methods.
+   * @brief This constructor is used by Stage::GetCurrent() methods.
    *
    * @SINCE_1_0.0
    * @param [in] stage A pointer to a Dali resource
index b0fcfcd..191a7b8 100644 (file)
@@ -26,15 +26,18 @@ namespace Dali
  */
 
 /**
- * @brief Basic type traits that every type has by default
- * This allows specialisations to not have to repeat all flags
+ * @brief Basic type traits that every type has by default.
+ *
+ * This allows specializations to not have to repeat all flags
  * @SINCE_1_0.0
  */
 template <typename Type>
 struct BasicTypes
 {
   /**
-   * @brief This flag tells Dali if a class can be considered POD. If it declares copy constructor and/or destructor, its not considered trivial
+   * @brief This flag tells Dali if a class can be considered POD.
+   *
+   * If it declares copy constructor and/or destructor, its not considered trivial
    * and cannot be copied by using memcpy etc.
    * @SINCE_1_0.0
    */
@@ -42,15 +45,20 @@ struct BasicTypes
 };
 
 /**
- * @brief Type traits support
+ * @brief Type traits.
+ *
  * An example of overriding a traits flag for a custom type can be done by:
- * <code>
+ *
+ * @code
+ *
  * namespace Dali
  * {
- *   /// Tell DALi that Matrix is POD, even though it has a copy constructor
- *   template <> struct TypeTraits< Matrix > : public BasicTypes< Matrix > { enum { IS_TRIVIAL_TYPE = true }; };
+ *   /// Tell DALi that Dali::Matrix is POD, even though it has a copy constructor
+ *   template <> struct TypeTraits< Dali::Matrix > : public BasicTypes< Dali::Matrix > { enum { IS_TRIVIAL_TYPE = true }; };
  * }
- * </code>
+ *
+ * @endcode
+ *
  * @SINCE_1_0.0
  */
 template <typename Type>
index 7d86e14..1a83232 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int CORE_MAJOR_VERSION = 1;
 const unsigned int CORE_MINOR_VERSION = 1;
-const unsigned int CORE_MICRO_VERSION = 20;
+const unsigned int CORE_MICRO_VERSION = 21;
 const char * const CORE_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifndef EMSCRIPTEN
index 18a7cff..c6cc8fd 100644 (file)
@@ -53,21 +53,23 @@ class DALI_IMPORT_API GestureDetector : public Handle
 public: // Creation & Destruction
 
   /**
-   * @brief Create an uninitialized GestureDetector; this can be initialized with one of the derived gestures' New() methods.
+   * @brief Create an uninitialized GestureDetector.
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * This can be initialized with one of the derived gesture detectors' New() methods. For example, PanGestureDetector::New().
+   *
+   * Calling member functions with an uninitialized Dali::GestureDetector handle is not allowed.
    * @SINCE_1_0.0
    */
   GestureDetector();
 
   /**
-   * @brief Downcast an Object handle to GestureDetector handle.
+   * @brief Downcast a handle to GestureDetector handle.
    *
    * If handle points to a GestureDetector object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a GestureDetector object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a GestureDetector object or an uninitialized handle
    */
   static GestureDetector DownCast( BaseHandle handle );
 
@@ -150,7 +152,7 @@ public: // Actor related
 protected:
 
   /**
-   * @brief This constructor is used by Dali New() methods of derived classes.
+   * @brief This constructor is used by New() methods of derived classes (For example, PanGestureDetector::New()).
    *
    * @SINCE_1_0.0
    * @param [in]  internal  A pointer to a newly allocated Dali resource.
index d16adc7..ea67cd1 100644 (file)
@@ -48,12 +48,15 @@ struct DALI_IMPORT_API Gesture
   /**
    * @brief Copy constructor.
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
    */
   Gesture( const Gesture& rhs );
 
   /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
+   * @return A reference to this
    */
   Gesture& operator=( const Gesture& rhs );
 
index 7e8bd72..a6b0c5b 100644 (file)
@@ -42,7 +42,7 @@ namespace Dali
  * pressed.
  *
  * Currently KeyEvent is also being used to relay messages from the
- * IMF keyboard to Core. In future IMF may communicate via its own
+ * IMF(Input Method Framework) keyboard to the internal core. In future IMF may communicate via its own
  * module.
  * @SINCE_1_0.0
  */
@@ -90,7 +90,7 @@ struct DALI_IMPORT_API KeyEvent
    * @brief Check to see if Shift key modifier has been supplied.
    *
    * @SINCE_1_0.0
-   * @return bool true if shift modifier
+   * @return True if shift modifier
    */
   bool IsShiftModifier() const;
 
@@ -98,7 +98,7 @@ struct DALI_IMPORT_API KeyEvent
    * @brief Check to see if Ctrl (control) key modifier has been supplied.
    *
    * @SINCE_1_0.0
-   * @return bool true if ctrl modifier
+   * @return True if ctrl modifier
    */
   bool IsCtrlModifier() const;
 
@@ -106,7 +106,7 @@ struct DALI_IMPORT_API KeyEvent
    * @brief Check to see if Alt key modifier has been supplied.
    *
    * @SINCE_1_0.0
-   * @return bool true if alt modifier
+   * @return True if alt modifier
    */
   bool IsAltModifier() const;
 
@@ -124,6 +124,11 @@ struct DALI_IMPORT_API KeyEvent
 
   /**
    * @brief Keycode for the key pressed.
+   *
+   * @remarks We recommend not to use this key code value
+   * directly because its meaning might be changed in the future. Currently, it means a
+   * platform-specific key code. You need to use IsKey() to know what a key event means
+   * instead of direct comparison of key code value.
    */
   int  keyCode;
 
index 9d383be..4a9c849 100644 (file)
@@ -70,7 +70,7 @@ public: // Creation & Destruction
   /**
    * @brief Create an uninitialized LongPressGestureDetector; this can be initialized with LongPressGestureDetector::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized LongPressGestureDetector handle is not allowed.
    * @SINCE_1_0.0
    */
   LongPressGestureDetector();
@@ -108,13 +108,13 @@ public: // Creation & Destruction
   static LongPressGestureDetector New(unsigned int minTouches, unsigned int maxTouches);
 
   /**
-   * @brief Downcast an Object handle to LongPressGestureDetector handle.
+   * @brief Downcast a handle to LongPressGestureDetector handle.
    *
    * If handle points to a LongPressGestureDetector object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a LongPressGestureDetector object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a LongPressGestureDetector object or an uninitialized handle
    */
   static LongPressGestureDetector DownCast( BaseHandle handle );
 
@@ -211,7 +211,7 @@ public: // Signals
 public: // Not intended for Application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by LongPressGestureDetector::New() methods.
    *
    * @SINCE_1_0.0
    * @param [in]  internal  A pointer to a newly allocated Dali resource.
index 6ae3f86..a71df01 100644 (file)
@@ -32,8 +32,8 @@ namespace Dali
 /**
  * @brief A LongPressGesture is emitted when the user touches and holds the screen with the stated number of fingers.
  *
- * This gesture can be in one of two states, when the long-press gesture is first detected: "Started";
- * and when the long-press gesture ends: "Finished".
+ * This gesture can be in one of two states, when the long-press gesture is first detected: Gesture::Started
+ * and when the long-press gesture ends: Gesture::Finished.
  *
  * Long press gesture finishes when all touches have been released.
  *
@@ -48,19 +48,22 @@ struct DALI_IMPORT_API LongPressGesture : public Gesture
    * @brief Constructor
    *
    * @SINCE_1_0.0
-   * @param[in] state  The state of the gesture
+   * @param[in] state The state of the gesture
    */
   LongPressGesture(Gesture::State state);
 
   /**
    * @brief Copy constructor
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
    */
   LongPressGesture( const LongPressGesture& rhs );
 
   /**
    * @brief Assignment operator
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
+   * @return A reference to this
    */
   LongPressGesture& operator=( const LongPressGesture& rhs );
 
index 75b1677..72f688e 100644 (file)
@@ -105,7 +105,7 @@ public: // Creation & Destruction
   /**
    * @brief Create an uninitialized PanGestureDetector; this can be initialized with PanGestureDetector::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized PanGestureDetector handle is not allowed.
    * @SINCE_1_0.0
    */
   PanGestureDetector();
@@ -119,13 +119,13 @@ public: // Creation & Destruction
   static PanGestureDetector New();
 
   /**
-   * @brief Downcast an Object handle to PanGestureDetector handle.
+   * @brief Downcast a handle to PanGestureDetector handle.
    *
    * If handle points to a PanGestureDetector object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a PanGestureDetector object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a PanGestureDetector object or an uninitialized handle
    */
   static PanGestureDetector DownCast( BaseHandle handle );
 
@@ -268,7 +268,7 @@ public: // Directional Panning
    * @brief Returns the angle by index that this pan gesture detector emits a signal.
    *
    * @SINCE_1_0.0
-   * @return an angle threshold pair, or a zero valued angle pair when index is invalid.
+   * @return An angle threshold pair, or a zero valued angle pair when index is invalid.
    * @pre The gesture detector has been initialized.
    * @pre The index is less than GetAngleCount()
    */
@@ -336,10 +336,10 @@ public: // Pan Properties Setters
 public: // Not intended for Application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by PanGestureDetector::New() methods.
    *
    * @SINCE_1_0.0
-   * @param [in]  internal  A pointer to a newly allocated Dali resource.
+   * @param [in] internal A pointer to a newly allocated Dali resource.
    */
   explicit DALI_INTERNAL PanGestureDetector(Internal::PanGestureDetector* internal);
 
index 61ee338..18acedc 100644 (file)
@@ -32,9 +32,9 @@ namespace Dali
 /**
  * @brief A PanGesture is emitted when the user moves one or more fingers in a particular direction.
  *
- * This gesture can be in one of three states, when the pan gesture is first detected: "Started";
- * when the pan gesture is continuing: "Continuing"; and finally, when the pan gesture ends:
- * "Finished".
+ * This gesture can be in one of three states, when the pan gesture is first detected: Gesture::Started
+ * when the pan gesture is continuing: Gesture::Continuing and finally, when the pan gesture ends:
+ * Gesture::Finished.
  *
  * A pan gesture will end in the following ways:
  * - User releases the primary finger (the first touch).
@@ -59,19 +59,22 @@ struct DALI_IMPORT_API PanGesture: public Gesture
    * @brief Constructor.
    *
    * @SINCE_1_0.0
-   * @param[in]  state  The state of the gesture
+   * @param[in] state The state of the gesture
    */
   PanGesture(Gesture::State state);
 
   /**
    * @brief Copy constructor.
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
    */
   PanGesture( const PanGesture& rhs );
 
   /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
+   * @return A reference to this
    */
   PanGesture& operator=( const PanGesture& rhs );
 
index 3cda2fc..37eb16a 100644 (file)
@@ -73,7 +73,7 @@ public: // Creation & Destruction
   /**
    * @brief Create an uninitialized PinchGestureDetector; this can be initialized with PinchGestureDetector::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized PinchGestureDetector handle is not allowed.
    * @SINCE_1_0.0
    */
   PinchGestureDetector();
@@ -87,13 +87,13 @@ public: // Creation & Destruction
   static PinchGestureDetector New();
 
   /**
-   * @brief Downcast an Object handle to PinchGestureDetector handle.
+   * @brief Downcast a handle to PinchGestureDetector handle.
    *
    * If handle points to a PinchGestureDetector object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a PinchGestureDetector object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a PinchGestureDetector object or an uninitialized handle
    */
   static PinchGestureDetector DownCast( BaseHandle handle );
 
@@ -140,7 +140,7 @@ public: // Signals
 public: // Not intended for Application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by PinchGestureDetector::New() methods.
    *
    * @SINCE_1_0.0
    * @param [in]  internal  A pointer to a newly allocated Dali resource.
index 0f35ee4..9d67203 100644 (file)
@@ -33,9 +33,9 @@ namespace Dali
  * @brief A PinchGesture is emitted when the user moves two fingers towards or away from each other.
  *
  * This gesture can be in one of three states; when the pinch gesture is first detected, its
- * state is set to "Started".  After this, if there is change in the gesture, the state will
- * be "Continuing".  Finally, when the gesture ends, the state of the gesture changes to
- * "Finished".
+ * state is set to Gesture::Started.  After this, if there is change in the gesture, the state will
+ * be Gesture::Continuing.  Finally, when the gesture ends, the state of the gesture changes to
+ * Gesture::Finished.
  *
  * A pinch gesture will continue to be sent to the actor under the center point of the pinch
  * until the pinch ends.
@@ -49,19 +49,22 @@ struct DALI_IMPORT_API PinchGesture: public Gesture
    * @brief Default Constructor.
    *
    * @SINCE_1_0.0
-   * @param[in]  state  The state of the gesture
+   * @param[in] state The state of the gesture
    */
   PinchGesture(Gesture::State state);
 
   /**
    * @brief Copy constructor.
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
    */
   PinchGesture( const PinchGesture& rhs );
 
   /**
    * @brief Assignment operator.
    * @SINCE_1_0.0
+   * @param[in] rhs A reference to the copied handle
+   * @return A reference to this
    */
   PinchGesture& operator=( const PinchGesture& rhs );
 
index 3f6b002..020558e 100644 (file)
@@ -40,9 +40,10 @@ struct TapGesture;
  * @brief This class emits a signal when a tap gesture occurs that meets the requirements set by the
  * application.
  *
- * See TapGestureDetector::SetTapsRequired
+ * See @ref TapGestureDetector::SetMinimumTapsRequired
+ * See @ref TapGestureDetector::SetMaximumTapsRequired
  *
- * A Tap Gesture is a discrete gesture, which means it does not have any state information attached
+ * A TapGesture is a discrete gesture, which means it does not have any state information attached
  * to it.  Please see TapGesture for more information.
  *
  * The application programmer can use this gesture detector as follows:
@@ -53,7 +54,7 @@ struct TapGesture;
  * @endcode
  *
  * @SINCE_1_0.0
- * @note Multi-touch taps are not currently supported. However, multiple taps (double & triple tap etc.) ARE supported.
+ * @note Multi-touch taps are not currently supported. However, multiple taps (double & triple tap etc.) are supported.
  *
  * Signals
  * | %Signal Name | Method                |
@@ -77,7 +78,7 @@ public: // Creation & Destruction
   /**
    * @brief Create an uninitialized TapGestureDetector; this can be initialized with TapGestureDetector::New().
    *
-   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   * Calling member functions with an uninitialized TapGestureDetector handle is not allowed.
    * @SINCE_1_0.0
    */
   TapGestureDetector();
@@ -95,19 +96,19 @@ public: // Creation & Destruction
    * @brief Create an initialized TapGestureDetector with the specified parameters.
    *
    * @SINCE_1_0.0
-   * @param[in]  tapsRequired     The minimum & maximum number of taps required.
+   * @param[in] tapsRequired The minimum & maximum number of taps required.
    * @return A handle to a newly allocated Dali resource.
    */
   static TapGestureDetector New( unsigned int tapsRequired );
 
   /**
-   * @brief Downcast an Object handle to TapGestureDetector handle.
+   * @brief Downcast a handle to TapGestureDetector handle.
    *
    * If handle points to a TapGestureDetector object the
    * downcast produces valid handle. If not the returned handle is left uninitialized.
    * @SINCE_1_0.0
-   * @param[in] handle to An object
-   * @return handle to a TapGestureDetector object or an uninitialized handle
+   * @param[in] handle Handle to an object
+   * @return Handle to a TapGestureDetector object or an uninitialized handle
    */
   static TapGestureDetector DownCast( BaseHandle handle );
 
@@ -198,10 +199,10 @@ public: // Signals
 public: // Not intended for Application developers
 
   /**
-   * @brief This constructor is used by Dali New() methods.
+   * @brief This constructor is used by TapGestureDetector::New() methods.
    *
    * @SINCE_1_0.0
-   * @param [in]  internal  A pointer to a newly allocated Dali resource.
+   * @param [in] internal A pointer to a newly allocated Dali resource.
    */
   explicit DALI_INTERNAL TapGestureDetector(Internal::TapGestureDetector* internal);
 };
index 0aa32fb..0f8645d 100644 (file)
@@ -49,12 +49,15 @@ struct DALI_IMPORT_API TapGesture : public Gesture
   /**
    * @brief Copy constructor
    * @SINCE_1_0.0
+   * @param rhs A reference to the copied handle
    */
   TapGesture( const TapGesture& rhs );
 
   /**
    * @brief Assignment operator
    * @SINCE_1_0.0
+   * @param rhs A reference to the copied handle
+   * @return A reference to this
    */
   TapGesture& operator=( const TapGesture& rhs );
 
index 0d76880..3fc4463 100644 (file)
@@ -49,7 +49,7 @@ struct DALI_IMPORT_API TouchEvent
   /**
    * @brief Constructor
    * @SINCE_1_0.0
-   * @param[in]  time  The time the event occurred
+   * @param[in] time The time the event occurred
    */
   TouchEvent(unsigned long time);
 
index 47351c6..ab4c442 100644 (file)
@@ -67,7 +67,7 @@ struct DALI_IMPORT_API WheelEvent
    * @SINCE_1_0.0
    * @param[in]  type       The type of the wheel event
    * @param[in]  direction  The direction of wheel rolling (0 = default vertical wheel, 1 = horizontal wheel)
-   * @param[in]  modifiers  modifier keys pressed during the event (such as shift, alt and control)
+   * @param[in]  modifiers  Modifier keys pressed during the event (such as shift, alt and control)
    * @param[in]  point      The co-ordinates of the cursor relative to the top-left of the screen.
    * @param[in]  z          The offset of rolling (positive value means roll down or clockwise, and negative value means roll up or counter-clockwise)
    * @param[in]  timeStamp  The time the wheel is being rolled.
@@ -84,7 +84,7 @@ struct DALI_IMPORT_API WheelEvent
    * @brief Check to see if Shift key modifier has been supplied.
    *
    * @SINCE_1_0.0
-   * @return bool true if shift modifier
+   * @return True if shift modifier
    */
   bool IsShiftModifier() const;
 
@@ -92,7 +92,7 @@ struct DALI_IMPORT_API WheelEvent
    * @brief Check to see if Ctrl (control) key modifier has been supplied.
    *
    * @SINCE_1_0.0
-   * @return bool true if ctrl modifier
+   * @return True if ctrl modifier
    */
   bool IsCtrlModifier() const;
 
@@ -100,7 +100,7 @@ struct DALI_IMPORT_API WheelEvent
    * @brief Check to see if Alt key modifier has been supplied.
    *
    * @SINCE_1_0.0
-   * @return bool true if alt modifier
+   * @return True if alt modifier
    */
   bool IsAltModifier() const;
 
index 5fe45df..1cafbc1 100644 (file)
@@ -259,7 +259,7 @@ private:
 };
 
 /**
- * @brief Template wrapper to downcast an base object handle to derived class handle.
+ * @brief Template wrapper to downcast a base object handle to derived class handle.
  *
  * @SINCE_1_0.0
  * @param handle to a base object
index 57ed846..7d0e5a0 100644 (file)
@@ -168,6 +168,7 @@ public:
 
   /**
    * @brief Query the index of a property.
+   *
    * Returns the first property index that matches the given name exactly.
    *
    * @SINCE_1_0.0
index 67cc7f4..49bd291 100644 (file)
@@ -69,7 +69,7 @@ public:
   PropertyNotification();
 
   /**
-   * @brief Downcast an Object handle to PropertyNotification.
+   * @brief Downcast a handle to PropertyNotification handle.
    *
    * If handle points to an PropertyNotification object the downcast
    * produces valid handle. If not the returned handle is left
@@ -138,7 +138,9 @@ public:
   Property::Index GetTargetProperty() const;
 
   /**
-   * @brief Sets the Notification mode. This determines how the property
+   * @brief Sets the Notification mode.
+   *
+   * This determines how the property
    * notification should respond to the result of a condition.
    *
    * @SINCE_1_0.0
index 01d8294..d7e6921 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali
 Summary:    The OpenGLES Canvas Core Library
-Version:    1.1.20
+Version:    1.1.21
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-2-Clause and MIT