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

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: Rebase. 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
« no previous file with comments | « cc/animation/animation_host.h ('k') | cc/animation/animation_registrar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 346
346 bool AnimationHost::ActivateAnimations() { 347 bool AnimationHost::ActivateAnimations() {
347 return animation_registrar_->ActivateAnimations(); 348 return animation_registrar_->ActivateAnimations();
348 } 349 }
349 350
350 bool AnimationHost::AnimateLayers(base::TimeTicks monotonic_time) { 351 bool AnimationHost::AnimateLayers(base::TimeTicks monotonic_time) {
351 return animation_registrar_->AnimateLayers(monotonic_time); 352 return animation_registrar_->AnimateLayers(monotonic_time);
352 } 353 }
353 354
354 bool AnimationHost::UpdateAnimationState(bool start_ready_animations, 355 bool AnimationHost::UpdateAnimationState(bool start_ready_animations,
355 AnimationEventsVector* events) { 356 AnimationEvents* events) {
356 return animation_registrar_->UpdateAnimationState(start_ready_animations, 357 return animation_registrar_->UpdateAnimationState(start_ready_animations,
357 events); 358 events);
358 } 359 }
359 360
360 scoped_ptr<AnimationEventsVector> AnimationHost::CreateEvents() { 361 scoped_ptr<AnimationEvents> AnimationHost::CreateEvents() {
361 return animation_registrar_->CreateEvents(); 362 return animation_registrar_->CreateEvents();
362 } 363 }
363 364
364 void AnimationHost::SetAnimationEvents( 365 void AnimationHost::SetAnimationEvents(scoped_ptr<AnimationEvents> events) {
365 scoped_ptr<AnimationEventsVector> events) {
366 return animation_registrar_->SetAnimationEvents(std::move(events)); 366 return animation_registrar_->SetAnimationEvents(std::move(events));
367 } 367 }
368 368
369 bool AnimationHost::ScrollOffsetAnimationWasInterrupted(int layer_id) const { 369 bool AnimationHost::ScrollOffsetAnimationWasInterrupted(int layer_id) const {
370 LayerAnimationController* controller = GetControllerForLayerId(layer_id); 370 LayerAnimationController* controller = GetControllerForLayerId(layer_id);
371 return controller ? controller->scroll_offset_animation_was_interrupted() 371 return controller ? controller->scroll_offset_animation_was_interrupted()
372 : false; 372 : false;
373 } 373 }
374 374
375 static LayerAnimationController::ObserverType ObserverTypeFromTreeType( 375 static LayerAnimationController::ObserverType ObserverTypeFromTreeType(
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 int layer_id, 569 int layer_id,
570 const gfx::Vector2dF& scroll_delta, 570 const gfx::Vector2dF& scroll_delta,
571 const gfx::ScrollOffset& max_scroll_offset, 571 const gfx::ScrollOffset& max_scroll_offset,
572 base::TimeTicks frame_monotonic_time) { 572 base::TimeTicks frame_monotonic_time) {
573 DCHECK(scroll_offset_animations_); 573 DCHECK(scroll_offset_animations_);
574 return scroll_offset_animations_->ScrollAnimationUpdateTarget( 574 return scroll_offset_animations_->ScrollAnimationUpdateTarget(
575 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time); 575 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time);
576 } 576 }
577 577
578 } // namespace cc 578 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation_host.h ('k') | cc/animation/animation_registrar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698