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

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

Issue 2006103004: Send takeover msg from MT to CC using the animation path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 bool AnimationHost::HasAnyAnimationTargetingProperty( 388 bool AnimationHost::HasAnyAnimationTargetingProperty(
389 ElementId element_id, 389 ElementId element_id,
390 TargetProperty::Type property) const { 390 TargetProperty::Type property) const {
391 auto element_animations = GetElementAnimationsForElementId(element_id); 391 auto element_animations = GetElementAnimationsForElementId(element_id);
392 if (!element_animations) 392 if (!element_animations)
393 return false; 393 return false;
394 394
395 return !!element_animations->GetAnimation(property); 395 return !!element_animations->GetAnimation(property);
396 } 396 }
397 397
398 bool AnimationHost::ScrollOffsetIsAnimatingOnImplOnly(
399 ElementId element_id) const {
400 auto element_animations = GetElementAnimationsForElementId(element_id);
401 if (!element_animations)
402 return false;
403
404 Animation* animation =
405 element_animations->GetAnimation(TargetProperty::SCROLL_OFFSET);
406 return animation && animation->is_impl_only();
407 }
408
409 bool AnimationHost::HasFilterAnimationThatInflatesBounds( 398 bool AnimationHost::HasFilterAnimationThatInflatesBounds(
410 ElementId element_id) const { 399 ElementId element_id) const {
411 auto element_animations = GetElementAnimationsForElementId(element_id); 400 auto element_animations = GetElementAnimationsForElementId(element_id);
412 return element_animations 401 return element_animations
413 ? element_animations->HasFilterAnimationThatInflatesBounds() 402 ? element_animations->HasFilterAnimationThatInflatesBounds()
414 : false; 403 : false;
415 } 404 }
416 405
417 bool AnimationHost::HasTransformAnimationThatInflatesBounds( 406 bool AnimationHost::HasTransformAnimationThatInflatesBounds(
418 ElementId element_id) const { 407 ElementId element_id) const {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 const AnimationHost::ElementToAnimationsMap& 548 const AnimationHost::ElementToAnimationsMap&
560 AnimationHost::all_element_animations_for_testing() const { 549 AnimationHost::all_element_animations_for_testing() const {
561 return element_to_animations_map_; 550 return element_to_animations_map_;
562 } 551 }
563 552
564 void AnimationHost::OnAnimationWaitingForDeletion() { 553 void AnimationHost::OnAnimationWaitingForDeletion() {
565 animation_waiting_for_deletion_ = true; 554 animation_waiting_for_deletion_ = true;
566 } 555 }
567 556
568 } // namespace cc 557 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698