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

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

Issue 1409393005: CC Animations: Fix draw properties invalidation on LAC destruction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_animation_timelines.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_animation_timelines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698