Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: cc/animation/animation_host.cc

Issue 1584743002: CC Animation: Replace AnimiationEventsVector with AnimiationEvents class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows compilation with MSVC. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "cc/animation/animation_host.h" 5 #include "cc/animation/animation_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "cc/animation/animation_delegate.h" 10 #include "cc/animation/animation_delegate.h"
11 #include "cc/animation/animation_events.h"
11 #include "cc/animation/animation_id_provider.h" 12 #include "cc/animation/animation_id_provider.h"
12 #include "cc/animation/animation_player.h" 13 #include "cc/animation/animation_player.h"
13 #include "cc/animation/animation_registrar.h" 14 #include "cc/animation/animation_registrar.h"
14 #include "cc/animation/animation_timeline.h" 15 #include "cc/animation/animation_timeline.h"
15 #include "cc/animation/element_animations.h" 16 #include "cc/animation/element_animations.h"
16 #include "cc/animation/scroll_offset_animation_curve.h" 17 #include "cc/animation/scroll_offset_animation_curve.h"
17 #include "cc/animation/timing_function.h" 18 #include "cc/animation/timing_function.h"
18 #include "ui/gfx/geometry/box_f.h" 19 #include "ui/gfx/geometry/box_f.h"
19 #include "ui/gfx/geometry/scroll_offset.h" 20 #include "ui/gfx/geometry/scroll_offset.h"
20 21
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 338
338 bool AnimationHost::ActivateAnimations() { 339 bool AnimationHost::ActivateAnimations() {
339 return animation_registrar_->ActivateAnimations(); 340 return animation_registrar_->ActivateAnimations();
340 } 341 }
341 342
342 bool AnimationHost::AnimateLayers(base::TimeTicks monotonic_time) { 343 bool AnimationHost::AnimateLayers(base::TimeTicks monotonic_time) {
343 return animation_registrar_->AnimateLayers(monotonic_time); 344 return animation_registrar_->AnimateLayers(monotonic_time);
344 } 345 }
345 346
346 bool AnimationHost::UpdateAnimationState(bool start_ready_animations, 347 bool AnimationHost::UpdateAnimationState(bool start_ready_animations,
347 AnimationEventsVector* events) { 348 AnimationEvents* events) {
348 return animation_registrar_->UpdateAnimationState(start_ready_animations, 349 return animation_registrar_->UpdateAnimationState(start_ready_animations,
349 events); 350 events);
350 } 351 }
351 352
352 scoped_ptr<AnimationEventsVector> AnimationHost::CreateEvents() { 353 scoped_ptr<AnimationEvents> AnimationHost::CreateEvents() {
353 return animation_registrar_->CreateEvents(); 354 return animation_registrar_->CreateEvents();
354 } 355 }
355 356
356 void AnimationHost::SetAnimationEvents( 357 void AnimationHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
357 scoped_ptr<AnimationEventsVector> events) {
358 return animation_registrar_->SetAnimationEvents(std::move(events)); 358 return animation_registrar_->SetAnimationEvents(std::move(events));
359 } 359 }
360 360
361 bool AnimationHost::ScrollOffsetAnimationWasInterrupted(int layer_id) const { 361 bool AnimationHost::ScrollOffsetAnimationWasInterrupted(int layer_id) const {
362 LayerAnimationController* controller = GetControllerForLayerId(layer_id); 362 LayerAnimationController* controller = GetControllerForLayerId(layer_id);
363 return controller ? controller->scroll_offset_animation_was_interrupted() 363 return controller ? controller->scroll_offset_animation_was_interrupted()
364 : false; 364 : false;
365 } 365 }
366 366
367 static LayerAnimationController::ObserverType ObserverTypeFromTreeType( 367 static LayerAnimationController::ObserverType ObserverTypeFromTreeType(
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 int layer_id, 561 int layer_id,
562 const gfx::Vector2dF& scroll_delta, 562 const gfx::Vector2dF& scroll_delta,
563 const gfx::ScrollOffset& max_scroll_offset, 563 const gfx::ScrollOffset& max_scroll_offset,
564 base::TimeTicks frame_monotonic_time) { 564 base::TimeTicks frame_monotonic_time) {
565 DCHECK(scroll_offset_animations_); 565 DCHECK(scroll_offset_animations_);
566 return scroll_offset_animations_->ScrollAnimationUpdateTarget( 566 return scroll_offset_animations_->ScrollAnimationUpdateTarget(
567 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time); 567 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time);
568 } 568 }
569 569
570 } // namespace cc 570 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698