Fix shader issue during Animation & UPDATE_PROPERTY action
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / visual-base-impl.cpp
index 004d201..81126c3 100644 (file)
@@ -830,7 +830,9 @@ Property::Index Visual::Base::GetPropertyIndex(Property::Key key)
         // Leave keyIndex as INVALID_KEY - it can still be registered against the string key.
       }
       Property::Value value = shader.GetProperty(index);
-      index                 = mImpl->mRenderer.RegisterProperty(keyIndex, keyName, value);
+
+      // We already know that mRenderer didn't have property. So we can assume that it is unique.
+      index = mImpl->mRenderer.RegisterUniqueProperty(keyIndex, keyName, value);
     }
   }
   return index;
@@ -1096,6 +1098,21 @@ Dali::Property Visual::Base::GetPropertyObject(Dali::Property::Key key)
       return OnGetPropertyObject(key);
     }
   }
+  else
+  {
+    if(index == mImpl->mBorderlineWidthIndex ||
+       index == mImpl->mBorderlineColorIndex ||
+       index == mImpl->mBorderlineOffsetIndex)
+    {
+      // Borderline is animated now. we always have to use borderline feature.
+      mImpl->mAlwaysUsingBorderline = true;
+    }
+    if(index == mImpl->mCornerRadiusIndex)
+    {
+      // CornerRadius is animated now. we always have to use corner radius feature.
+      mImpl->mAlwaysUsingCornerRadius = true;
+    }
+  }
 
   return Dali::Property(mImpl->mRenderer, index);
 }