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

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

Issue 1587073011: Plumb NotifyAnimationAborted from the compositor to blink animation delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: initialize aborted_ in unittest 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_delegate.h ('k') | cc/animation/animation_player.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"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void NotifyAnimationStarted(base::TimeTicks monotonic_time, 101 void NotifyAnimationStarted(base::TimeTicks monotonic_time,
102 Animation::TargetProperty target_property, 102 Animation::TargetProperty target_property,
103 int group) override {} 103 int group) override {}
104 void NotifyAnimationFinished(base::TimeTicks monotonic_time, 104 void NotifyAnimationFinished(base::TimeTicks monotonic_time,
105 Animation::TargetProperty target_property, 105 Animation::TargetProperty target_property,
106 int group) override { 106 int group) override {
107 DCHECK_EQ(target_property, Animation::SCROLL_OFFSET); 107 DCHECK_EQ(target_property, Animation::SCROLL_OFFSET);
108 DCHECK(animation_host_->mutator_host_client()); 108 DCHECK(animation_host_->mutator_host_client());
109 animation_host_->mutator_host_client()->ScrollOffsetAnimationFinished(); 109 animation_host_->mutator_host_client()->ScrollOffsetAnimationFinished();
110 } 110 }
111 void NotifyAnimationAborted(base::TimeTicks monotonic_time,
112 Animation::TargetProperty target_property,
113 int group) override {}
111 114
112 private: 115 private:
113 void ReattachScrollOffsetPlayerIfNeeded(int layer_id) { 116 void ReattachScrollOffsetPlayerIfNeeded(int layer_id) {
114 if (scroll_offset_animation_player_->layer_id() != layer_id) { 117 if (scroll_offset_animation_player_->layer_id() != layer_id) {
115 if (scroll_offset_animation_player_->layer_id()) 118 if (scroll_offset_animation_player_->layer_id())
116 scroll_offset_animation_player_->DetachLayer(); 119 scroll_offset_animation_player_->DetachLayer();
117 if (layer_id) 120 if (layer_id)
118 scroll_offset_animation_player_->AttachLayer(layer_id); 121 scroll_offset_animation_player_->AttachLayer(layer_id);
119 } 122 }
120 } 123 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 int layer_id, 572 int layer_id,
570 const gfx::Vector2dF& scroll_delta, 573 const gfx::Vector2dF& scroll_delta,
571 const gfx::ScrollOffset& max_scroll_offset, 574 const gfx::ScrollOffset& max_scroll_offset,
572 base::TimeTicks frame_monotonic_time) { 575 base::TimeTicks frame_monotonic_time) {
573 DCHECK(scroll_offset_animations_); 576 DCHECK(scroll_offset_animations_);
574 return scroll_offset_animations_->ScrollAnimationUpdateTarget( 577 return scroll_offset_animations_->ScrollAnimationUpdateTarget(
575 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time); 578 layer_id, scroll_delta, max_scroll_offset, frame_monotonic_time);
576 } 579 }
577 580
578 } // namespace cc 581 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/animation_delegate.h ('k') | cc/animation/animation_player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698