Revert "[Tizen] Not execute the remove callback"
[platform/core/uifw/dali-core.git] / dali / internal / event / rendering / decorated-visual-renderer-impl.cpp
1 /*
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/event/rendering/decorated-visual-renderer-impl.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/devel-api/rendering/renderer-devel.h>
23 #include <dali/devel-api/scripting/scripting.h>
24 #include <dali/internal/event/common/property-helper.h> // DALI_PROPERTY_TABLE_BEGIN, DALI_PROPERTY, DALI_PROPERTY_TABLE_END
25 #include <dali/internal/event/common/property-input-impl.h>
26 #include <dali/internal/update/manager/update-manager.h>
27 #include <dali/internal/update/rendering/scene-graph-renderer.h>
28 #include <dali/public-api/object/type-registry.h>
29
30 namespace Dali
31 {
32 namespace Internal
33 {
34 namespace
35 {
36 /**
37  * Properties: |name                              |type     |writable|animatable|constraint-input|enum for index-checking|
38  */
39 DALI_PROPERTY_TABLE_BEGIN
40 DALI_PROPERTY("cornerRadius", VECTOR4, true, true, true, Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS)
41 DALI_PROPERTY("cornerRadiusPolicy", FLOAT, true, false, true, Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS_POLICY)
42 DALI_PROPERTY("borderlineWidth", FLOAT, true, true, true, Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH)
43 DALI_PROPERTY("borderlineColor", VECTOR4, true, true, true, Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR)
44 DALI_PROPERTY("borderlineOffset", FLOAT, true, true, true, Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET)
45 DALI_PROPERTY("blurRadius", FLOAT, true, true, true, Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS)
46 DALI_PROPERTY_TABLE_END(Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS, DecoratedVisualRendererDefaultProperties)
47
48 BaseHandle Create()
49 {
50   return Dali::BaseHandle();
51 }
52
53 TypeRegistration mType(typeid(Dali::DecoratedVisualRenderer), typeid(Dali::VisualRenderer), Create, DecoratedVisualRendererDefaultProperties);
54
55 } // unnamed namespace
56
57 DecoratedVisualRendererPtr DecoratedVisualRenderer::New()
58 {
59   // create scene object first so it's guaranteed to exist for the event side
60   auto sceneObject = SceneGraph::Renderer::New();
61
62   auto animatableVisualProperties          = new AnimatableVisualProperties();
63   auto animatableDecoratedVisualProperties = new AnimatableDecoratedVisualProperties();
64
65   // Append extended properties as AnimatableDecoratedVisualProperties.
66   animatableVisualProperties->mExtendedProperties               = animatableDecoratedVisualProperties;
67   animatableVisualProperties->mExtendedPropertiesDeleteFunction = AnimatableDecoratedVisualProperties::DeleteFunction;
68
69   sceneObject->SetVisualProperties(animatableVisualProperties);
70
71   OwnerPointer<SceneGraph::Renderer> transferOwnership(sceneObject);
72   // pass the pointer to base for message passing
73   DecoratedVisualRendererPtr rendererPtr(new DecoratedVisualRenderer(sceneObject));
74
75   rendererPtr->AddUniformMappings(); // Ensure properties are mapped to uniforms
76
77   // transfer scene object ownership to update manager
78   EventThreadServices&       eventThreadServices = rendererPtr->GetEventThreadServices();
79   SceneGraph::UpdateManager& updateManager       = eventThreadServices.GetUpdateManager();
80   AddRendererMessage(updateManager, transferOwnership);
81
82   eventThreadServices.RegisterObject(rendererPtr.Get());
83   return rendererPtr;
84 }
85
86 DecoratedVisualRenderer::DecoratedVisualRenderer(const SceneGraph::Renderer* sceneObject)
87 : VisualRenderer(sceneObject),
88   mDecoratedPropertyCache(),
89   mAddUniformFlag(0u)
90 {
91 }
92
93 DecoratedVisualRenderer::~DecoratedVisualRenderer()
94 {
95   // The scene object will be deleted by ~VisualRenderer
96 }
97
98 void DecoratedVisualRenderer::SetDefaultProperty(Property::Index        index,
99                                                  const Property::Value& propertyValue)
100 {
101   if(index < Dali::DecoratedVisualRenderer::Property::DEFAULT_DECORATED_VISUAL_RENDERER_PROPERTY_START_INDEX)
102   {
103     VisualRenderer::SetDefaultProperty(index, propertyValue);
104   }
105   else
106   {
107     switch(index)
108     {
109       case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS:
110       {
111         if(propertyValue.Get(mDecoratedPropertyCache.mCornerRadius))
112         {
113           const SceneGraph::Renderer& sceneObject      = GetVisualRendererSceneObject();
114           auto                        visualProperties = sceneObject.GetVisualProperties();
115
116           if(visualProperties)
117           {
118             auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
119             if(decoratedVisualProperties)
120             {
121               BakeMessage<Vector4>(GetEventThreadServices(), decoratedVisualProperties->mCornerRadius, mDecoratedPropertyCache.mCornerRadius);
122             }
123           }
124         }
125         break;
126       }
127
128       case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS_POLICY:
129       {
130         if(propertyValue.Get(mDecoratedPropertyCache.mCornerRadiusPolicy))
131         {
132           const SceneGraph::Renderer& sceneObject      = GetVisualRendererSceneObject();
133           auto                        visualProperties = sceneObject.GetVisualProperties();
134
135           if(visualProperties)
136           {
137             auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
138             if(decoratedVisualProperties)
139             {
140               BakeMessage<float>(GetEventThreadServices(), decoratedVisualProperties->mCornerRadiusPolicy, mDecoratedPropertyCache.mCornerRadiusPolicy);
141             }
142           }
143         }
144         break;
145       }
146
147       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH:
148       {
149         if(propertyValue.Get(mDecoratedPropertyCache.mBorderlineWidth))
150         {
151           const SceneGraph::Renderer& sceneObject      = GetVisualRendererSceneObject();
152           auto                        visualProperties = sceneObject.GetVisualProperties();
153
154           if(visualProperties)
155           {
156             auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
157             if(decoratedVisualProperties)
158             {
159               BakeMessage<float>(GetEventThreadServices(), decoratedVisualProperties->mBorderlineWidth, mDecoratedPropertyCache.mBorderlineWidth);
160             }
161           }
162         }
163         break;
164       }
165
166       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR:
167       {
168         if(propertyValue.Get(mDecoratedPropertyCache.mBorderlineColor))
169         {
170           const SceneGraph::Renderer& sceneObject      = GetVisualRendererSceneObject();
171           auto                        visualProperties = sceneObject.GetVisualProperties();
172
173           if(visualProperties)
174           {
175             auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
176             if(decoratedVisualProperties)
177             {
178               BakeMessage<Vector4>(GetEventThreadServices(), decoratedVisualProperties->mBorderlineColor, mDecoratedPropertyCache.mBorderlineColor);
179             }
180           }
181         }
182         break;
183       }
184
185       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET:
186       {
187         if(propertyValue.Get(mDecoratedPropertyCache.mBorderlineOffset))
188         {
189           const SceneGraph::Renderer& sceneObject      = GetVisualRendererSceneObject();
190           auto                        visualProperties = sceneObject.GetVisualProperties();
191
192           if(visualProperties)
193           {
194             auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
195             if(decoratedVisualProperties)
196             {
197               BakeMessage<float>(GetEventThreadServices(), decoratedVisualProperties->mBorderlineOffset, mDecoratedPropertyCache.mBorderlineOffset);
198             }
199           }
200         }
201         break;
202       }
203
204       case Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS:
205       {
206         if(propertyValue.Get(mDecoratedPropertyCache.mBlurRadius))
207         {
208           const SceneGraph::Renderer& sceneObject      = GetVisualRendererSceneObject();
209           auto                        visualProperties = sceneObject.GetVisualProperties();
210
211           if(visualProperties)
212           {
213             auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
214             if(decoratedVisualProperties)
215             {
216               BakeMessage<float>(GetEventThreadServices(), decoratedVisualProperties->mBlurRadius, mDecoratedPropertyCache.mBlurRadius);
217             }
218           }
219         }
220         break;
221       }
222     }
223   }
224 }
225
226 Property::Value DecoratedVisualRenderer::GetDefaultProperty(Property::Index index) const
227 {
228   Property::Value value;
229
230   if(index < Dali::DecoratedVisualRenderer::Property::DEFAULT_DECORATED_VISUAL_RENDERER_PROPERTY_START_INDEX)
231   {
232     value = VisualRenderer::GetDefaultProperty(index);
233   }
234   else
235   {
236     switch(index)
237     {
238       case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS:
239       {
240         value = mDecoratedPropertyCache.mCornerRadius;
241         break;
242       }
243       case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS_POLICY:
244       {
245         value = mDecoratedPropertyCache.mCornerRadiusPolicy;
246         break;
247       }
248       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH:
249       {
250         value = mDecoratedPropertyCache.mBorderlineWidth;
251         break;
252       }
253       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR:
254       {
255         value = mDecoratedPropertyCache.mBorderlineColor;
256         break;
257       }
258       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET:
259       {
260         value = mDecoratedPropertyCache.mBorderlineOffset;
261         break;
262       }
263       case Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS:
264       {
265         value = mDecoratedPropertyCache.mBlurRadius;
266         break;
267       }
268       default:
269       {
270         break;
271       }
272     }
273   }
274
275   return value;
276 }
277
278 Property::Value DecoratedVisualRenderer::GetDefaultPropertyCurrentValue(Property::Index index) const
279 {
280   Property::Value value;
281
282   if(index < Dali::DecoratedVisualRenderer::Property::DEFAULT_DECORATED_VISUAL_RENDERER_PROPERTY_START_INDEX)
283   {
284     value = VisualRenderer::GetDefaultPropertyCurrentValue(index);
285   }
286   else
287   {
288     const SceneGraph::Renderer& sceneObject = GetVisualRendererSceneObject();
289
290     switch(index)
291     {
292       case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS:
293       {
294         auto visualProperties = sceneObject.GetVisualProperties();
295         if(visualProperties)
296         {
297           auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
298           if(decoratedVisualProperties)
299           {
300             value = decoratedVisualProperties->mCornerRadius[GetEventThreadServices().GetEventBufferIndex()];
301           }
302         }
303         break;
304       }
305       case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS_POLICY:
306       {
307         auto visualProperties = sceneObject.GetVisualProperties();
308         if(visualProperties)
309         {
310           auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
311           if(decoratedVisualProperties)
312           {
313             value = decoratedVisualProperties->mCornerRadiusPolicy[GetEventThreadServices().GetEventBufferIndex()];
314           }
315         }
316         break;
317       }
318       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH:
319       {
320         auto visualProperties = sceneObject.GetVisualProperties();
321         if(visualProperties)
322         {
323           auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
324           if(decoratedVisualProperties)
325           {
326             value = decoratedVisualProperties->mBorderlineWidth[GetEventThreadServices().GetEventBufferIndex()];
327           }
328         }
329         break;
330       }
331       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR:
332       {
333         auto visualProperties = sceneObject.GetVisualProperties();
334         if(visualProperties)
335         {
336           auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
337           if(decoratedVisualProperties)
338           {
339             value = decoratedVisualProperties->mBorderlineColor[GetEventThreadServices().GetEventBufferIndex()];
340           }
341         }
342         break;
343       }
344       case Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET:
345       {
346         auto visualProperties = sceneObject.GetVisualProperties();
347         if(visualProperties)
348         {
349           auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
350           if(decoratedVisualProperties)
351           {
352             value = decoratedVisualProperties->mBorderlineOffset[GetEventThreadServices().GetEventBufferIndex()];
353           }
354         }
355         break;
356       }
357       case Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS:
358       {
359         auto visualProperties = sceneObject.GetVisualProperties();
360         if(visualProperties)
361         {
362           auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
363           if(decoratedVisualProperties)
364           {
365             value = decoratedVisualProperties->mBlurRadius[GetEventThreadServices().GetEventBufferIndex()];
366           }
367         }
368         break;
369       }
370     }
371   }
372   return value;
373 }
374
375 void DecoratedVisualRenderer::OnNotifyDefaultPropertyAnimation(Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType)
376 {
377   if(index < Dali::DecoratedVisualRenderer::Property::DEFAULT_DECORATED_VISUAL_RENDERER_PROPERTY_START_INDEX)
378   {
379     VisualRenderer::OnNotifyDefaultPropertyAnimation(animation, index, value, animationType);
380   }
381   else
382   {
383     switch(animationType)
384     {
385       case Animation::TO:
386       case Animation::BETWEEN:
387       {
388         switch(index)
389         {
390           case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS:
391           {
392             value.Get(mDecoratedPropertyCache.mCornerRadius);
393             break;
394           }
395           case Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH:
396           {
397             value.Get(mDecoratedPropertyCache.mBorderlineWidth);
398             break;
399           }
400           case Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR:
401           {
402             value.Get(mDecoratedPropertyCache.mBorderlineColor);
403             break;
404           }
405           case Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET:
406           {
407             value.Get(mDecoratedPropertyCache.mBorderlineOffset);
408             break;
409           }
410           case Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS:
411           {
412             value.Get(mDecoratedPropertyCache.mBlurRadius);
413             break;
414           }
415         }
416         break;
417       }
418
419       case Animation::BY:
420       {
421         switch(index)
422         {
423           case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS:
424           {
425             AdjustValue<Vector4>(mDecoratedPropertyCache.mCornerRadius, value);
426             break;
427           }
428           case Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH:
429           {
430             AdjustValue<float>(mDecoratedPropertyCache.mBorderlineWidth, value);
431             break;
432           }
433           case Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR:
434           {
435             AdjustValue<Vector4>(mDecoratedPropertyCache.mBorderlineColor, value);
436             break;
437           }
438           case Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET:
439           {
440             AdjustValue<float>(mDecoratedPropertyCache.mBorderlineOffset, value);
441             break;
442           }
443           case Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS:
444           {
445             AdjustValue<float>(mDecoratedPropertyCache.mBlurRadius, value);
446             break;
447           }
448         }
449         break;
450       }
451     }
452   }
453 }
454
455 const SceneGraph::PropertyBase* DecoratedVisualRenderer::GetSceneObjectAnimatableProperty(Property::Index index) const
456 {
457   const SceneGraph::PropertyBase* property = nullptr;
458
459   switch(index)
460   {
461     case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS:
462     {
463       auto visualProperties = GetVisualRendererSceneObject().GetVisualProperties();
464       if(visualProperties)
465       {
466         auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
467         if(decoratedVisualProperties)
468         {
469           property = &decoratedVisualProperties->mCornerRadius;
470         }
471       }
472       break;
473     }
474     case Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH:
475     {
476       auto visualProperties = GetVisualRendererSceneObject().GetVisualProperties();
477       if(visualProperties)
478       {
479         auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
480         if(decoratedVisualProperties)
481         {
482           property = &decoratedVisualProperties->mBorderlineWidth;
483         }
484       }
485       break;
486     }
487     case Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR:
488     {
489       auto visualProperties = GetVisualRendererSceneObject().GetVisualProperties();
490       if(visualProperties)
491       {
492         auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
493         if(decoratedVisualProperties)
494         {
495           property = &decoratedVisualProperties->mBorderlineColor;
496         }
497       }
498       break;
499     }
500     case Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET:
501     {
502       auto visualProperties = GetVisualRendererSceneObject().GetVisualProperties();
503       if(visualProperties)
504       {
505         auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
506         if(decoratedVisualProperties)
507         {
508           property = &decoratedVisualProperties->mBorderlineOffset;
509         }
510       }
511       break;
512     }
513     case Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS:
514     {
515       auto visualProperties = GetVisualRendererSceneObject().GetVisualProperties();
516       if(visualProperties)
517       {
518         auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
519         if(decoratedVisualProperties)
520         {
521           property = &decoratedVisualProperties->mBlurRadius;
522         }
523       }
524       break;
525     }
526   }
527
528   if(!property)
529   {
530     // not our property, ask base
531     property = VisualRenderer::GetSceneObjectAnimatableProperty(index);
532   }
533
534   return property;
535 }
536
537 const PropertyInputImpl* DecoratedVisualRenderer::GetSceneObjectInputProperty(Property::Index index) const
538 {
539   if(index < Dali::DecoratedVisualRenderer::Property::DEFAULT_DECORATED_VISUAL_RENDERER_PROPERTY_START_INDEX)
540   {
541     return VisualRenderer::GetSceneObjectInputProperty(index);
542   }
543   switch(index)
544   {
545     case Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS_POLICY:
546     {
547       auto visualProperties = GetVisualRendererSceneObject().GetVisualProperties();
548       if(visualProperties)
549       {
550         auto decoratedVisualProperties = static_cast<AnimatableDecoratedVisualProperties*>(visualProperties->mExtendedProperties);
551         if(decoratedVisualProperties)
552         {
553           return &decoratedVisualProperties->mCornerRadiusPolicy;
554         }
555       }
556       break;
557     }
558     default:
559     {
560       return GetSceneObjectAnimatableProperty(index);
561     }
562   }
563   return nullptr;
564 }
565
566 void DecoratedVisualRenderer::RegisterCornerRadiusUniform()
567 {
568   AddUniformFlag(DECORATED_VISUAL_RENDERER_USE_CORNER_RADIUS);
569 }
570
571 void DecoratedVisualRenderer::RegisterBorderlineUniform()
572 {
573   AddUniformFlag(DECORATED_VISUAL_RENDERER_USE_BORDERLINE);
574 }
575
576 void DecoratedVisualRenderer::RegisterBlurRadiusUniform()
577 {
578   AddUniformFlag(DECORATED_VISUAL_RENDERER_USE_BLUR_RADIUS);
579 }
580
581 void DecoratedVisualRenderer::AddUniformFlag(uint8_t newAddFlag)
582 {
583   const uint8_t diffUniformFlag = (~mAddUniformFlag) & newAddFlag;
584   if(diffUniformFlag)
585   {
586     if(diffUniformFlag & DECORATED_VISUAL_RENDERER_USE_CORNER_RADIUS)
587     {
588       AddUniformMapping(Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS, ConstString("cornerRadius"));
589       AddUniformMapping(Dali::DecoratedVisualRenderer::Property::CORNER_RADIUS_POLICY, ConstString("cornerRadiusPolicy"));
590     }
591     if(diffUniformFlag & DECORATED_VISUAL_RENDERER_USE_BORDERLINE)
592     {
593       AddUniformMapping(Dali::DecoratedVisualRenderer::Property::BORDERLINE_WIDTH, ConstString("borderlineWidth"));
594       AddUniformMapping(Dali::DecoratedVisualRenderer::Property::BORDERLINE_COLOR, ConstString("borderlineColor"));
595       AddUniformMapping(Dali::DecoratedVisualRenderer::Property::BORDERLINE_OFFSET, ConstString("borderlineOffset"));
596     }
597     if(diffUniformFlag & DECORATED_VISUAL_RENDERER_USE_BLUR_RADIUS)
598     {
599       AddUniformMapping(Dali::DecoratedVisualRenderer::Property::BLUR_RADIUS, ConstString("blurRadius"));
600     }
601
602     // Note. Let we don't remove UniformMapping due to the performane issue.
603     mAddUniformFlag |= newAddFlag;
604   }
605 }
606
607 } // namespace Internal
608
609 } // namespace Dali