skottie_transform_property_value.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2022 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. #ifndef CC_PAINT_SKOTTIE_TRANSFORM_PROPERTY_VALUE_H_
  5. #define CC_PAINT_SKOTTIE_TRANSFORM_PROPERTY_VALUE_H_
  6. #include "base/containers/flat_map.h"
  7. #include "cc/paint/paint_export.h"
  8. #include "cc/paint/skottie_resource_metadata.h"
  9. #include "ui/gfx/geometry/point_f.h"
  10. namespace cc {
  11. // Contains a subset of the fields in skottie::TransformPropertyValue that the
  12. // caller may be interested in. Other fields may be added to this class as
  13. // the need arises.
  14. struct CC_PAINT_EXPORT SkottieTransformPropertyValue {
  15. bool operator==(const SkottieTransformPropertyValue& other) const;
  16. bool operator!=(const SkottieTransformPropertyValue& other) const;
  17. gfx::PointF position;
  18. };
  19. // Node name in the Lottie file (hashed) to corresponding
  20. // SkottieTransformPropertyValue.
  21. using SkottieTransformPropertyValueMap =
  22. base::flat_map<SkottieResourceIdHash, SkottieTransformPropertyValue>;
  23. } // namespace cc
  24. #endif // CC_PAINT_SKOTTIE_TRANSFORM_PROPERTY_VALUE_H_