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

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: . Created 4 years, 4 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
« cc/trees/layer_tree_host_impl.cc ('K') | « 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 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 if (node->opacity == opacity) 920 if (node->opacity == opacity)
921 return; 921 return;
922 node->opacity = opacity; 922 node->opacity = opacity;
923 node->effect_changed = true; 923 node->effect_changed = true;
924 property_trees()->changed = true; 924 property_trees()->changed = true;
925 property_trees()->effect_tree.set_needs_update(true); 925 property_trees()->effect_tree.set_needs_update(true);
926 layer_tree_impl->set_needs_update_draw_properties(); 926 layer_tree_impl->set_needs_update_draw_properties();
927 layer_tree_impl->AddToOpacityAnimationsMap(node->owner_id, opacity); 927 layer_tree_impl->AddToOpacityAnimationsMap(node->owner_id, opacity);
928 } 928 }
929 929
930 void EffectTree::OnFilterAnimated(const FilterOperations& filters,
931 int id,
932 LayerTreeImpl* layer_tree_impl) {
933 EffectNode* node = Node(id);
934 layer_tree_impl->AddToFilterAnimationsMap(node->owner_id, filters);
935 if (node->filters == filters)
936 return;
937 node->filters = filters;
938 node->effect_changed = true;
939 property_trees()->changed = true;
940 property_trees()->effect_tree.set_needs_update(true);
941 layer_tree_impl->set_needs_update_draw_properties();
942 }
943
930 void EffectTree::UpdateEffects(int id) { 944 void EffectTree::UpdateEffects(int id) {
931 EffectNode* node = Node(id); 945 EffectNode* node = Node(id);
932 EffectNode* parent_node = parent(node); 946 EffectNode* parent_node = parent(node);
933 947
934 UpdateOpacities(node, parent_node); 948 UpdateOpacities(node, parent_node);
935 UpdateIsDrawn(node, parent_node); 949 UpdateIsDrawn(node, parent_node);
936 UpdateEffectChanged(node, parent_node); 950 UpdateEffectChanged(node, parent_node);
937 UpdateBackfaceVisibility(node, parent_node); 951 UpdateBackfaceVisibility(node, parent_node);
938 UpdateSurfaceContentsScale(node); 952 UpdateSurfaceContentsScale(node);
939 } 953 }
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 from_target.ConcatTransform(draw_transforms.from_target); 2217 from_target.ConcatTransform(draw_transforms.from_target);
2204 from_target.Scale(effect_node->surface_contents_scale.x(), 2218 from_target.Scale(effect_node->surface_contents_scale.x(),
2205 effect_node->surface_contents_scale.y()); 2219 effect_node->surface_contents_scale.y());
2206 DCHECK(from_target.ApproximatelyEqual(*transform) || 2220 DCHECK(from_target.ApproximatelyEqual(*transform) ||
2207 !draw_transforms.invertible); 2221 !draw_transforms.invertible);
2208 } 2222 }
2209 return success; 2223 return success;
2210 } 2224 }
2211 2225
2212 } // namespace cc 2226 } // namespace cc
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/property_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698