Blending enum clean-up 11/67011/5
authorPaul Wisbey <p.wisbey@samsung.com>
Fri, 22 Apr 2016 13:04:01 +0000 (14:04 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Fri, 29 Apr 2016 13:57:56 +0000 (14:57 +0100)
We were previously using a mixture of BLEND and BLENDING in enums.
The order of the BLEND_FACTOR enums & string names was also inconsistent.

As a rule of thumb always use Blend & BLEND for namespaces & enums/constants
(not Blending or BLENDING)

Change-Id: Ia4dd6483edc56e9736436e7aa8545b40f999ba47

emscripten-examples/dali-toy.js
examples/benchmark/benchmark.cpp
examples/item-view/item-view-example.cpp
examples/metaball-explosion/metaball-explosion-example.cpp
examples/metaball-refrac/metaball-refrac-example.cpp
examples/perf-scroll/perf-scroll.cpp
resources/scripts/animated-colors.json
resources/scripts/background.json
resources/scripts/clock.json
resources/scripts/table-view.json

index c1e8329a607cdc37a6ba52aa73a3556c529d1a7b..2fa343e4b49b798ab6c4b24343c4c81d5811cf3e 100644 (file)
@@ -3304,7 +3304,7 @@ dali.Builder.prototype.material = function(name, d) {
   //                    blend: "AUTO",
   //                    blendFunc : {srcFactorRGBA, destFactorRGBA},
   //                    blendEquation : "",
-  //                    blendColor : [1,0,0,1] } )
+  //                    mixColor : [1,0,0,1] } )
   //
   "use strict";
   var value; // check required things
index 470f9b95bbda7bf9ad93307927d0803f688763b4..3824de81bd57f2c7724adca5b3f86031c1ba0980 100644 (file)
@@ -229,7 +229,7 @@ Renderer CreateRenderer( unsigned int index )
     textureSet.SetImage( 0u, image );
     renderers[index] = Renderer::New( QuadMesh(), shader );
     renderers[index].SetTextures( textureSet );
-    renderers[index].SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::OFF );
+    renderers[index].SetProperty( Renderer::Property::BLEND_MODE, BlendMode::OFF );
   }
   return renderers[index];
 }
index aeb1d2e6fca1ea6d8c39c396d5833e592fd7fc00..c898c0ccd55254bff8a5b14b98ea95df71afd9d2 100644 (file)
@@ -868,7 +868,7 @@ public: // From ItemFactory
 
     Property::Map solidColorProperty;
     solidColorProperty.Insert( "rendererType", "color" );
-    solidColorProperty.Insert( "blendColor", Vector4(0.f, 0.f, 0.f, 0.6f) );
+    solidColorProperty.Insert( "mixColor", Vector4(0.f, 0.f, 0.f, 0.6f) );
     checkbox.SetProperty( ImageView::Property::IMAGE, solidColorProperty );
 
     if( MODE_REMOVE_MANY  != mMode &&
index 39519b8bcbbc38e00a03bb406fc9109fa428838d..231d778a9e7525316742e0e22b4cc7fa08fe2fc9 100644 (file)
@@ -466,8 +466,12 @@ void MetaballExplosionController::CreateMetaballActors()
 
   Geometry metaballGeom = CreateGeometry();
   Renderer renderer = Renderer::New( metaballGeom, shader );
-  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::ON );
-  renderer.SetBlendFunc(BlendingFactor::ONE, BlendingFactor::ONE, BlendingFactor::ONE, BlendingFactor::ONE);
+  renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB,    BlendFactor::ONE );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB,   BlendFactor::ONE );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_ALPHA,  BlendFactor::ONE );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE  );
+
   //Initialization of each of the metaballs
   for( int i = 0; i < METABALL_NUMBER; i++ )
   {
index 995977c11471b78c05e27a0d31a5670583cda4d3..a1382b367f09755f2d1aea72d2b608300c86421e 100644 (file)
@@ -439,8 +439,11 @@ void MetaballRefracController::CreateMetaballActors()
   Shader shader = Shader::New( METABALL_VERTEX_SHADER, METABALL_FRAG_SHADER );
   Geometry metaballGeom = CreateGeometry();
   Renderer renderer = Renderer::New( metaballGeom, shader );
-  renderer.SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::ON );
-  renderer.SetBlendFunc(BlendingFactor::ONE, BlendingFactor::ONE, BlendingFactor::ONE, BlendingFactor::ONE);
+  renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB,    BlendFactor::ONE );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_RGB,   BlendFactor::ONE );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_ALPHA,  BlendFactor::ONE );
+  renderer.SetProperty( Renderer::Property::BLEND_FACTOR_DEST_ALPHA, BlendFactor::ONE  );
 
   //Each metaball has a different radius
   mMetaballs[0].radius = mMetaballs[0].initRadius = 0.0145f;
index 90a02ce0d5fd9e094a677aa2ba34c9365ff7f393..78ca137d7359fc3146d8a64730297593ed26a12b 100644 (file)
@@ -231,8 +231,7 @@ Renderer CreateRenderer( unsigned int index )
     textureSet.SetImage( 0u, image );
     renderers[index] = Renderer::New( QuadMesh(), shader );
     renderers[index].SetTextures( textureSet );
-    renderers[index].SetProperty( Renderer::Property::BLENDING_MODE, BlendingMode::OFF );
-
+    renderers[index].SetProperty( Renderer::Property::BLEND_MODE, BlendMode::OFF );
   }
   return renderers[index];
 }
index 02ecf4daf17628a0f4958daf88869ee8dd36f357..79d253c587cf6b13a4f4034ef21daaa56cca946a 100644 (file)
@@ -43,7 +43,7 @@
           "sizeAspectRatio": false,
           "background": {
             "rendererType": "color",
-            "blendColor": [1,1,1,1]
+            "mixColor": [1,1,1,1]
           },
           "color": [
             0.5686274509803921,
@@ -79,7 +79,7 @@
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 0.17647058823529413,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     0.7411764705882353,
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 0.23137254901960785,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     0.17647058823529413,
                       "sizeAspectRatio": false,
                       "background": {
                         "rendererType": "color",
-                        "blendColor": [1,1,1,1]
+                        "mixColor": [1,1,1,1]
                       },
                       "color": [
                         0.396078431372549,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     0,
                       "sizeAspectRatio": false,
                       "background": {
                         "rendererType": "color",
-                        "blendColor": [1,1,1,1]
+                        "mixColor": [1,1,1,1]
                       },
                       "color": [
                         0.20784313725490197,
                           "sizeAspectRatio": false,
                           "background": {
                             "rendererType": "color",
-                            "blendColor": [1,1,1,1]
+                            "mixColor": [1,1,1,1]
                           },
                           "color": [
                             0.4196078431372549,
                       "sizeAspectRatio": false,
                       "background": {
                         "rendererType": "color",
-                        "blendColor": [1,1,1,1]
+                        "mixColor": [1,1,1,1]
                       },
                       "color": [
                         0.47843137254901963,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     0.4470588235294118,
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 1,
           "sizeAspectRatio": false,
           "background": {
             "rendererType": "color",
-            "blendColor": [1,1,1,1]
+            "mixColor": [1,1,1,1]
           },
           "color": [
             0.43137254901960786,
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 0.8196078431372549,
           "sizeAspectRatio": false,
           "background": {
             "rendererType": "color",
-            "blendColor": [1,1,1,1]
+            "mixColor": [1,1,1,1]
           },
           "color": [
             0.6313725490196078,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     0.9176470588235294,
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 0.24313725490196078,
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 0,
                       "sizeAspectRatio": false,
                       "background": {
                         "rendererType": "color",
-                        "blendColor": [1,1,1,1]
+                        "mixColor": [1,1,1,1]
                       },
                       "color": [
                         1,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     0,
                   "sizeAspectRatio": false,
                   "background": {
                     "rendererType": "color",
-                    "blendColor": [1,1,1,1]
+                    "mixColor": [1,1,1,1]
                   },
                   "color": [
                     1,
               "sizeAspectRatio": false,
               "background": {
                 "rendererType": "color",
-                "blendColor": [1,1,1,1]
+                "mixColor": [1,1,1,1]
               },
               "color": [
                 0.01568627450980392,
           "sizeAspectRatio": false,
           "background": {
             "rendererType": "color",
-            "blendColor": [1,1,1,1]
+            "mixColor": [1,1,1,1]
           },
           "color": [
             0.2784313725490196,
       "sizeAspectRatio": false,
       "background": {
         "rendererType": "color",
-        "blendColor": [1,1,1,1]
+        "mixColor": [1,1,1,1]
       },
       "color": [
         0.1568627450980392,
index 365289cc2c609115b8f42dda639654ac26718203..cd1944af3d9ec04f551eb542b3e81cd4952642f7 100644 (file)
@@ -31,7 +31,7 @@
       "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
       "background":{
         "rendererType": "color",
-        "blendColor": [ 0.8, 0, 0.2, 1 ]
+        "mixColor": [ 0.8, 0, 0.2, 1 ]
        }
     },
 
@@ -92,7 +92,7 @@
       "sizeModeFactor": [ 0.5, 0.333333333333, 1 ],
       "background":{
         "rendererType": "color",
-        "blendColor": [ 1, 1, 0, 1 ]
+        "mixColor": [ 1, 1, 0, 1 ]
       }
     },
 
index c132b0acc8dfa5f095e93b88f6bf685e80db97e5..d8cecfc1d4eb0bc35ec817aa57e460c33429a8db 100644 (file)
@@ -9,7 +9,7 @@
       "anchorPoint": [0.5, 1, 0.5],
       "background": {
         "rendererType": "color",
-        "blendColor": [0.71, 0, 0, 1]
+        "mixColor": [0.71, 0, 0, 1]
       },
       "selected": false,
       "signals": [
@@ -28,7 +28,7 @@
       "anchorPoint": [0.5, 1, 0.5],
       "background": {
         "rendererType": "color",
-        "blendColor": [0, 0.14200000000000013, 0.71, 0.7]
+        "mixColor": [0, 0.14200000000000013, 0.71, 0.7]
       },
       "signals": [
       {
@@ -46,7 +46,7 @@
       "anchorPoint": [0.5, 1, 0.5],
       "background": {
         "rendererType": "color",
-        "blendColor": [0.057450000000000064, 0.3, 0.0030000000000000027, 0.7]
+        "mixColor": [0.057450000000000064, 0.3, 0.0030000000000000027, 0.7]
       },
       "signals": [
       {
index 075cb8f3e2284a33f54b4fe62f169cdab924edc3..482719c3e574365c3780c63b6d8115afe7730434 100644 (file)
@@ -44,7 +44,7 @@
       "type":"TableView",
       "background":{
         "rendererType": "color",
-        "blendColor": [0.5,0.5,0,1]
+        "mixColor": [0.5,0.5,0,1]
         },
       "parentOrigin": "CENTER",
       "size":[400,400,1],