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

Side by Side Diff: cc/layers/layer.cc

Issue 1957533002: cc : Track opacity animation changes on effect tree (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 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 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after
1661 1661
1662 } else { 1662 } else {
1663 node->data.local_maximum_animation_target_scale = 0.f; 1663 node->data.local_maximum_animation_target_scale = 0.f;
1664 node->data.local_starting_animation_scale = 0.f; 1664 node->data.local_starting_animation_scale = 0.f;
1665 node->data.has_only_translation_animations = true; 1665 node->data.has_only_translation_animations = true;
1666 } 1666 }
1667 transform_tree.set_needs_update(true); 1667 transform_tree.set_needs_update(true);
1668 } 1668 }
1669 } 1669 }
1670 1670
1671 void Layer::OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating) {
1672 DCHECK(layer_tree_host_);
1673 EffectTree& effect_tree = layer_tree_host_->property_trees()->effect_tree;
1674 EffectNode* node = effect_tree.Node(effect_tree_index());
1675 if (!node)
1676 return;
1677
1678 if (node->owner_id == id())
1679 node->data.is_currently_animating_opacity = is_currently_animating;
1680 }
1681
1671 bool Layer::HasActiveAnimationForTesting() const { 1682 bool Layer::HasActiveAnimationForTesting() const {
1672 return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this) 1683 return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this)
1673 : false; 1684 : false;
1674 } 1685 }
1675 1686
1676 ScrollbarLayerInterface* Layer::ToScrollbarLayer() { 1687 ScrollbarLayerInterface* Layer::ToScrollbarLayer() {
1677 return nullptr; 1688 return nullptr;
1678 } 1689 }
1679 1690
1680 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const { 1691 RenderingStatsInstrumentation* Layer::rendering_stats_instrumentation() const {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 ->data.num_copy_requests_in_subtree; 1764 ->data.num_copy_requests_in_subtree;
1754 } 1765 }
1755 1766
1756 gfx::Transform Layer::screen_space_transform() const { 1767 gfx::Transform Layer::screen_space_transform() const {
1757 DCHECK_NE(transform_tree_index_, -1); 1768 DCHECK_NE(transform_tree_index_, -1);
1758 return draw_property_utils::ScreenSpaceTransform( 1769 return draw_property_utils::ScreenSpaceTransform(
1759 this, layer_tree_host_->property_trees()->transform_tree); 1770 this, layer_tree_host_->property_trees()->transform_tree);
1760 } 1771 }
1761 1772
1762 } // namespace cc 1773 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/proto/property_tree.proto » ('j') | cc/proto/property_tree.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698