/// <summary> /// Creates the actual animator instance /// </summary> private static IValueAnimator CreateDouble(Timeline timeline, double startingValue, double targetValue) { if (timeline.GetIsDependantAnimation() || timeline.GetIsDurationZero()) { return(new NativeValueAnimatorAdapter(ValueAnimator.OfFloat((float)startingValue, (float)targetValue))); } else { return(timeline.GetGPUAnimator(startingValue, targetValue)); } }
/// <summary> /// Animation should be hardware-bound if it is neither dependent, nor zero-duration. /// </summary> internal static bool GetIsHardwareAnimated(this Timeline timeline) => !timeline.GetIsDependantAnimation() && !timeline.GetIsDurationZero();