OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "services/ui/ws/scheduled_animation_group.h" | 5 #include "services/ui/ws/scheduled_animation_group.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "services/ui/ws/server_window.h" | 9 #include "services/ui/ws/server_window.h" |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return gfx::Tween::EASE_OUT; | 82 return gfx::Tween::EASE_OUT; |
83 case mojom::AnimationTweenType::EASE_IN_OUT: | 83 case mojom::AnimationTweenType::EASE_IN_OUT: |
84 return gfx::Tween::EASE_IN_OUT; | 84 return gfx::Tween::EASE_IN_OUT; |
85 } | 85 } |
86 return gfx::Tween::LINEAR; | 86 return gfx::Tween::LINEAR; |
87 } | 87 } |
88 | 88 |
89 void ConvertToScheduledValue(const mojom::AnimationValue& transport_value, | 89 void ConvertToScheduledValue(const mojom::AnimationValue& transport_value, |
90 ScheduledAnimationValue* value) { | 90 ScheduledAnimationValue* value) { |
91 value->float_value = transport_value.float_value; | 91 value->float_value = transport_value.float_value; |
92 value->transform = transport_value.transform; | 92 value->transform = |
| 93 transport_value.transform ? *transport_value.transform : gfx::Transform(); |
93 } | 94 } |
94 | 95 |
95 void ConvertToScheduledElement(const mojom::AnimationElement& transport_element, | 96 void ConvertToScheduledElement(const mojom::AnimationElement& transport_element, |
96 ScheduledAnimationElement* element) { | 97 ScheduledAnimationElement* element) { |
97 element->property = transport_element.property; | 98 element->property = transport_element.property; |
98 element->duration = | 99 element->duration = |
99 base::TimeDelta::FromMicroseconds(transport_element.duration); | 100 base::TimeDelta::FromMicroseconds(transport_element.duration); |
100 element->tween_type = AnimationTypeToTweenType(transport_element.tween_type); | 101 element->tween_type = AnimationTypeToTweenType(transport_element.tween_type); |
101 if (transport_element.property != AnimationProperty::NONE) { | 102 if (transport_element.property != AnimationProperty::NONE) { |
102 if (transport_element.start_value.get()) { | 103 if (transport_element.start_value.get()) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 return sequences_.empty(); | 348 return sequences_.empty(); |
348 } | 349 } |
349 | 350 |
350 ScheduledAnimationGroup::ScheduledAnimationGroup(ServerWindow* window, | 351 ScheduledAnimationGroup::ScheduledAnimationGroup(ServerWindow* window, |
351 uint32_t id, | 352 uint32_t id, |
352 base::TimeTicks time_scheduled) | 353 base::TimeTicks time_scheduled) |
353 : window_(window), id_(id), time_scheduled_(time_scheduled) {} | 354 : window_(window), id_(id), time_scheduled_(time_scheduled) {} |
354 | 355 |
355 } // namespace ws | 356 } // namespace ws |
356 } // namespace ui | 357 } // namespace ui |
OLD | NEW |