| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |