| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1660 | 1660 |
| 1661 } else { | 1661 } else { |
| 1662 node->data.local_maximum_animation_target_scale = 0.f; | 1662 node->data.local_maximum_animation_target_scale = 0.f; |
| 1663 node->data.local_starting_animation_scale = 0.f; | 1663 node->data.local_starting_animation_scale = 0.f; |
| 1664 node->data.has_only_translation_animations = true; | 1664 node->data.has_only_translation_animations = true; |
| 1665 } | 1665 } |
| 1666 transform_tree.set_needs_update(true); | 1666 transform_tree.set_needs_update(true); |
| 1667 } | 1667 } |
| 1668 } | 1668 } |
| 1669 | 1669 |
| 1670 void Layer::OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating) { |
| 1671 DCHECK(layer_tree_host_); |
| 1672 EffectTree& effect_tree = layer_tree_host_->property_trees()->effect_tree; |
| 1673 EffectNode* node = effect_tree.Node(effect_tree_index()); |
| 1674 if (!node) |
| 1675 return; |
| 1676 |
| 1677 if (node->owner_id == id()) |
| 1678 node->data.is_currently_animating_opacity = is_currently_animating; |
| 1679 } |
| 1680 |
| 1670 bool Layer::HasActiveAnimationForTesting() const { | 1681 bool Layer::HasActiveAnimationForTesting() const { |
| 1671 return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this) | 1682 return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this) |
| 1672 : false; | 1683 : false; |
| 1673 } | 1684 } |
| 1674 | 1685 |
| 1675 ScrollbarLayerInterface* Layer::ToScrollbarLayer() { | 1686 ScrollbarLayerInterface* Layer::ToScrollbarLayer() { |
| 1676 return nullptr; | 1687 return nullptr; |
| 1677 } | 1688 } |
| 1678 | 1689 |
| 1679 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { | 1690 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 ->data.num_copy_requests_in_subtree; | 1763 ->data.num_copy_requests_in_subtree; |
| 1753 } | 1764 } |
| 1754 | 1765 |
| 1755 gfx::Transform Layer::screen_space_transform() const { | 1766 gfx::Transform Layer::screen_space_transform() const { |
| 1756 DCHECK_NE(transform_tree_index_, -1); | 1767 DCHECK_NE(transform_tree_index_, -1); |
| 1757 return draw_property_utils::ScreenSpaceTransform( | 1768 return draw_property_utils::ScreenSpaceTransform( |
| 1758 this, layer_tree_host_->property_trees()->transform_tree); | 1769 this, layer_tree_host_->property_trees()->transform_tree); |
| 1759 } | 1770 } |
| 1760 | 1771 |
| 1761 } // namespace cc | 1772 } // namespace cc |
| OLD | NEW |