OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/numerics/safe_conversions.h" | 8 #include "base/numerics/safe_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 | 873 |
874 node->data.has_only_translation_animations = | 874 node->data.has_only_translation_animations = |
875 HasOnlyTranslationTransforms(); | 875 HasOnlyTranslationTransforms(); |
876 } else { | 876 } else { |
877 node->data.local_maximum_animation_target_scale = 0.f; | 877 node->data.local_maximum_animation_target_scale = 0.f; |
878 node->data.local_starting_animation_scale = 0.f; | 878 node->data.local_starting_animation_scale = 0.f; |
879 node->data.has_only_translation_animations = true; | 879 node->data.has_only_translation_animations = true; |
880 } | 880 } |
881 | 881 |
882 transform_tree.set_needs_update(true); | 882 transform_tree.set_needs_update(true); |
| 883 layer_tree_impl()->set_needs_update_draw_properties(); |
883 } | 884 } |
884 } | 885 } |
885 } | 886 } |
886 | 887 |
887 void LayerImpl::UpdatePropertyTreeOpacity() { | 888 void LayerImpl::UpdatePropertyTreeOpacity() { |
888 if (effect_tree_index_ != -1) { | 889 if (effect_tree_index_ != -1) { |
889 EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree; | 890 EffectTree& effect_tree = layer_tree_impl()->property_trees()->effect_tree; |
890 if (effect_tree_index_ >= static_cast<int>(effect_tree.size())) | 891 if (effect_tree_index_ >= static_cast<int>(effect_tree.size())) |
891 return; | 892 return; |
892 EffectNode* node = effect_tree.Node(effect_tree_index_); | 893 EffectNode* node = effect_tree.Node(effect_tree_index_); |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1801 } | 1802 } |
1802 | 1803 |
1803 // TODO(enne): the transform needs to come from property trees instead of | 1804 // TODO(enne): the transform needs to come from property trees instead of |
1804 // draw properties. | 1805 // draw properties. |
1805 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1806 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1806 draw_properties().target_space_transform, default_scale); | 1807 draw_properties().target_space_transform, default_scale); |
1807 return std::max(transform_scales.x(), transform_scales.y()); | 1808 return std::max(transform_scales.x(), transform_scales.y()); |
1808 } | 1809 } |
1809 | 1810 |
1810 } // namespace cc | 1811 } // namespace cc |
OLD | NEW |