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

Side by Side Diff: cc/layer_impl.cc

Issue 11633044: We don't want to tick animation controllers for non-active layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding the suggested TODO. Created 7 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 | Annotate | Revision Log
« no previous file with comments | « cc/layer_impl.h ('k') | cc/test/animation_test_common.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_impl.h" 5 #include "cc/layer_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/animation_registrar.h" 10 #include "cc/animation_registrar.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 void LayerImpl::OnOpacityAnimated(float opacity) 489 void LayerImpl::OnOpacityAnimated(float opacity)
490 { 490 {
491 setOpacity(opacity); 491 setOpacity(opacity);
492 } 492 }
493 493
494 void LayerImpl::OnTransformAnimated(const gfx::Transform& transform) 494 void LayerImpl::OnTransformAnimated(const gfx::Transform& transform)
495 { 495 {
496 setTransform(transform); 496 setTransform(transform);
497 } 497 }
498 498
499 bool LayerImpl::IsActive() const
500 {
501 return m_layerTreeImpl->IsActiveTree();
502 }
503
499 void LayerImpl::setBounds(const gfx::Size& bounds) 504 void LayerImpl::setBounds(const gfx::Size& bounds)
500 { 505 {
501 if (m_bounds == bounds) 506 if (m_bounds == bounds)
502 return; 507 return;
503 508
504 m_bounds = bounds; 509 m_bounds = bounds;
505 510
506 if (masksToBounds()) 511 if (masksToBounds())
507 noteLayerPropertyChangedForSubtree(); 512 noteLayerPropertyChangedForSubtree();
508 else 513 else
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 821
817 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 822 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
818 { 823 {
819 if (!m_scrollbarAnimationController) 824 if (!m_scrollbarAnimationController)
820 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 825 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
821 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 826 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
822 m_scrollbarAnimationController->updateScrollOffset(this); 827 m_scrollbarAnimationController->updateScrollOffset(this);
823 } 828 }
824 829
825 } // namespace cc 830 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_impl.h ('k') | cc/test/animation_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698