| 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 void LayerImpl::OnOpacityAnimated(float opacity) | 488 void LayerImpl::OnOpacityAnimated(float opacity) |
| 489 { | 489 { |
| 490 setOpacity(opacity); | 490 setOpacity(opacity); |
| 491 } | 491 } |
| 492 | 492 |
| 493 void LayerImpl::OnTransformAnimated(const gfx::Transform& transform) | 493 void LayerImpl::OnTransformAnimated(const gfx::Transform& transform) |
| 494 { | 494 { |
| 495 setTransform(transform); | 495 setTransform(transform); |
| 496 } | 496 } |
| 497 | 497 |
| 498 bool LayerImpl::IsActive() const |
| 499 { |
| 500 return m_layerTreeImpl->IsActiveTree(); |
| 501 } |
| 502 |
| 498 void LayerImpl::setBounds(const gfx::Size& bounds) | 503 void LayerImpl::setBounds(const gfx::Size& bounds) |
| 499 { | 504 { |
| 500 if (m_bounds == bounds) | 505 if (m_bounds == bounds) |
| 501 return; | 506 return; |
| 502 | 507 |
| 503 m_bounds = bounds; | 508 m_bounds = bounds; |
| 504 | 509 |
| 505 if (masksToBounds()) | 510 if (masksToBounds()) |
| 506 noteLayerPropertyChangedForSubtree(); | 511 noteLayerPropertyChangedForSubtree(); |
| 507 else | 512 else |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 | 813 |
| 809 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 814 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
| 810 { | 815 { |
| 811 if (!m_scrollbarAnimationController) | 816 if (!m_scrollbarAnimationController) |
| 812 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); | 817 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); |
| 813 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 818 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
| 814 m_scrollbarAnimationController->updateScrollOffset(this); | 819 m_scrollbarAnimationController->updateScrollOffset(this); |
| 815 } | 820 } |
| 816 | 821 |
| 817 } // namespace cc | 822 } // namespace cc |
| OLD | NEW |