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

Side by Side Diff: cc/animation/layer_animation_controller.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: 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layer_animation_controller.h" 5 #include "cc/animation/layer_animation_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 454
455 void LayerAnimationController::NotifyAnimationAborted( 455 void LayerAnimationController::NotifyAnimationAborted(
456 const AnimationEvent& event) { 456 const AnimationEvent& event) {
457 bool aborted_transform_animation = false; 457 bool aborted_transform_animation = false;
458 for (size_t i = 0; i < animations_.size(); ++i) { 458 for (size_t i = 0; i < animations_.size(); ++i) {
459 if (animations_[i]->group() == event.group_id && 459 if (animations_[i]->group() == event.group_id &&
460 animations_[i]->target_property() == event.target_property) { 460 animations_[i]->target_property() == event.target_property) {
461 animations_[i]->SetRunState(Animation::ABORTED, event.monotonic_time); 461 animations_[i]->SetRunState(Animation::ABORTED, event.monotonic_time);
462 animations_[i]->set_received_finished_event(true); 462 animations_[i]->set_received_finished_event(true);
463 if (layer_animation_delegate_)
464 layer_animation_delegate_->NotifyAnimationAborted(
465 event.monotonic_time, event.target_property, event.group_id);
463 if (event.target_property == Animation::TRANSFORM) 466 if (event.target_property == Animation::TRANSFORM)
464 aborted_transform_animation = true; 467 aborted_transform_animation = true;
465 } 468 }
466 } 469 }
467 if (aborted_transform_animation) 470 if (aborted_transform_animation)
468 UpdatePotentiallyAnimatingTransform(); 471 UpdatePotentiallyAnimatingTransform();
469 } 472 }
470 473
471 void LayerAnimationController::NotifyAnimationPropertyUpdate( 474 void LayerAnimationController::NotifyAnimationPropertyUpdate(
472 const AnimationEvent& event) { 475 const AnimationEvent& event) {
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 &value_observers_); 1250 &value_observers_);
1248 LayerAnimationValueObserver* obs; 1251 LayerAnimationValueObserver* obs;
1249 while ((obs = it.GetNext()) != nullptr) 1252 while ((obs = it.GetNext()) != nullptr)
1250 if (obs->IsActive()) 1253 if (obs->IsActive())
1251 return true; 1254 return true;
1252 } 1255 }
1253 return false; 1256 return false;
1254 } 1257 }
1255 1258
1256 } // namespace cc 1259 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698