1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_PATH_INTERPOLATION_FUNCTIONS_H_
6 #define THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_PATH_INTERPOLATION_FUNCTIONS_H_
7 
8 #include <memory>
9 #include "third_party/blink/renderer/core/animation/interpolation_type.h"
10 #include "third_party/blink/renderer/core/svg/svg_path_byte_stream.h"
11 #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
12 
13 namespace blink {
14 
15 class StylePath;
16 
17 class PathInterpolationFunctions {
18   STATIC_ONLY(PathInterpolationFunctions);
19 
20  public:
21   enum CoordinateConversion { PreserveCoordinates, ForceAbsolute };
22 
23   static scoped_refptr<StylePath> AppliedValue(const InterpolableValue&,
24                                                const NonInterpolableValue*);
25 
26   static void Composite(UnderlyingValueOwner&,
27                         double underlying_fraction,
28                         const InterpolationType&,
29                         const InterpolationValue&);
30 
31   static InterpolationValue ConvertValue(const StylePath*,
32                                          CoordinateConversion);
33 
34   static InterpolationValue MaybeConvertNeutral(
35       const InterpolationValue& underlying,
36       InterpolationType::ConversionCheckers&);
37 
38   static PairwiseInterpolationValue MaybeMergeSingles(
39       InterpolationValue&& start,
40       InterpolationValue&& end);
41 };
42 
43 }  // namespace blink
44 
45 #endif  // THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_PATH_INTERPOLATION_FUNCTIONS_H_
46