animation_key.h 681 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2021 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 UI_VIEWS_ANIMATION_ANIMATION_KEY_H_
  5. #define UI_VIEWS_ANIMATION_ANIMATION_KEY_H_
  6. #include <tuple>
  7. #include "ui/compositor/layer_animation_element.h"
  8. namespace ui {
  9. class Layer;
  10. }
  11. namespace views {
  12. struct AnimationKey {
  13. ui::Layer* target;
  14. ui::LayerAnimationElement::AnimatableProperty property;
  15. bool operator<(const AnimationKey& key) const {
  16. return std::tie(target, property) < std::tie(key.target, key.property);
  17. }
  18. };
  19. } // namespace views
  20. #endif // UI_VIEWS_ANIMATION_ANIMATION_KEY_H_