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

Side by Side Diff: cc/trees/property_tree.cc

Issue 2270273002: cc : Add OnFilterAnimated to effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 3 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
« no previous file with comments | « cc/trees/property_tree.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 layer_tree_impl->AddToOpacityAnimationsMap(node->owner_id, opacity); 936 layer_tree_impl->AddToOpacityAnimationsMap(node->owner_id, opacity);
937 if (node->opacity == opacity) 937 if (node->opacity == opacity)
938 return; 938 return;
939 node->opacity = opacity; 939 node->opacity = opacity;
940 node->effect_changed = true; 940 node->effect_changed = true;
941 property_trees()->changed = true; 941 property_trees()->changed = true;
942 property_trees()->effect_tree.set_needs_update(true); 942 property_trees()->effect_tree.set_needs_update(true);
943 layer_tree_impl->set_needs_update_draw_properties(); 943 layer_tree_impl->set_needs_update_draw_properties();
944 } 944 }
945 945
946 void EffectTree::OnFilterAnimated(const FilterOperations& filters,
947 int id,
948 LayerTreeImpl* layer_tree_impl) {
949 EffectNode* node = Node(id);
950 layer_tree_impl->AddToFilterAnimationsMap(node->owner_id, filters);
951 if (node->filters == filters)
952 return;
953 node->filters = filters;
954 node->effect_changed = true;
955 property_trees()->changed = true;
956 property_trees()->effect_tree.set_needs_update(true);
957 layer_tree_impl->set_needs_update_draw_properties();
958 }
959
946 void EffectTree::UpdateEffects(int id) { 960 void EffectTree::UpdateEffects(int id) {
947 EffectNode* node = Node(id); 961 EffectNode* node = Node(id);
948 EffectNode* parent_node = parent(node); 962 EffectNode* parent_node = parent(node);
949 963
950 UpdateOpacities(node, parent_node); 964 UpdateOpacities(node, parent_node);
951 UpdateIsDrawn(node, parent_node); 965 UpdateIsDrawn(node, parent_node);
952 UpdateEffectChanged(node, parent_node); 966 UpdateEffectChanged(node, parent_node);
953 UpdateBackfaceVisibility(node, parent_node); 967 UpdateBackfaceVisibility(node, parent_node);
954 UpdateSurfaceContentsScale(node); 968 UpdateSurfaceContentsScale(node);
955 } 969 }
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 from_target.ConcatTransform(draw_transforms.from_target); 2233 from_target.ConcatTransform(draw_transforms.from_target);
2220 from_target.Scale(effect_node->surface_contents_scale.x(), 2234 from_target.Scale(effect_node->surface_contents_scale.x(),
2221 effect_node->surface_contents_scale.y()); 2235 effect_node->surface_contents_scale.y());
2222 DCHECK(from_target.ApproximatelyEqual(*transform) || 2236 DCHECK(from_target.ApproximatelyEqual(*transform) ||
2223 !draw_transforms.invertible); 2237 !draw_transforms.invertible);
2224 } 2238 }
2225 return success; 2239 return success;
2226 } 2240 }
2227 2241
2228 } // namespace cc 2242 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/property_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698