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/view_manager/scheduled_animation_group.h" | 5 #include "services/view_manager/scheduled_animation_group.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
10 #include "services/view_manager/server_view.h" | 10 #include "services/view_manager/server_view.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 scoped_ptr<ScheduledAnimationGroup> group( | 290 scoped_ptr<ScheduledAnimationGroup> group( |
291 new ScheduledAnimationGroup(view, id, now)); | 291 new ScheduledAnimationGroup(view, id, now)); |
292 group->sequences_.resize(transport_group.sequences.size()); | 292 group->sequences_.resize(transport_group.sequences.size()); |
293 for (size_t i = 0; i < transport_group.sequences.size(); ++i) { | 293 for (size_t i = 0; i < transport_group.sequences.size(); ++i) { |
294 const mojo::AnimationSequence& transport_sequence( | 294 const mojo::AnimationSequence& transport_sequence( |
295 *(transport_group.sequences[i])); | 295 *(transport_group.sequences[i])); |
296 DCHECK_NE(0u, transport_sequence.elements.size()); | 296 DCHECK_NE(0u, transport_sequence.elements.size()); |
297 ConvertSequenceToScheduled(transport_sequence, now, &group->sequences_[i]); | 297 ConvertSequenceToScheduled(transport_sequence, now, &group->sequences_[i]); |
298 } | 298 } |
299 return group.Pass(); | 299 return group; |
300 } | 300 } |
301 | 301 |
302 void ScheduledAnimationGroup::ObtainStartValues() { | 302 void ScheduledAnimationGroup::ObtainStartValues() { |
303 for (ScheduledAnimationSequence& sequence : sequences_) | 303 for (ScheduledAnimationSequence& sequence : sequences_) |
304 GetStartValueFromViewIfNecessary(view_, &(sequence.elements[0])); | 304 GetStartValueFromViewIfNecessary(view_, &(sequence.elements[0])); |
305 } | 305 } |
306 | 306 |
307 void ScheduledAnimationGroup::SetValuesToTargetValuesForPropertiesNotIn( | 307 void ScheduledAnimationGroup::SetValuesToTargetValuesForPropertiesNotIn( |
308 const ScheduledAnimationGroup& other) { | 308 const ScheduledAnimationGroup& other) { |
309 std::set<AnimationProperty> our_properties; | 309 std::set<AnimationProperty> our_properties; |
(...skipping 29 matching lines...) Expand all Loading... |
339 return sequences_.empty(); | 339 return sequences_.empty(); |
340 } | 340 } |
341 | 341 |
342 ScheduledAnimationGroup::ScheduledAnimationGroup(ServerView* view, | 342 ScheduledAnimationGroup::ScheduledAnimationGroup(ServerView* view, |
343 uint32_t id, | 343 uint32_t id, |
344 base::TimeTicks time_scheduled) | 344 base::TimeTicks time_scheduled) |
345 : view_(view), id_(id), time_scheduled_(time_scheduled) { | 345 : view_(view), id_(id), time_scheduled_(time_scheduled) { |
346 } | 346 } |
347 | 347 |
348 } // namespace view_manager | 348 } // namespace view_manager |
OLD | NEW |