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

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

Issue 2866733002: Remove owning_id from EffectNode and replace it by an opaque stable_id (Closed)
Patch Set: none Created 3 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
« no previous file with comments | « cc/trees/effect_node.h ('k') | cc/trees/layer_tree_host_common_unittest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/trace_event/trace_event_argument.h" 5 #include "base/trace_event/trace_event_argument.h"
6 #include "cc/layers/layer.h" 6 #include "cc/layers/layer.h"
7 #include "cc/trees/effect_node.h" 7 #include "cc/trees/effect_node.h"
8 #include "cc/trees/property_tree.h" 8 #include "cc/trees/property_tree.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 EffectNode::EffectNode() 12 EffectNode::EffectNode()
13 : id(EffectTree::kInvalidNodeId), 13 : id(EffectTree::kInvalidNodeId),
14 parent_id(EffectTree::kInvalidNodeId), 14 parent_id(EffectTree::kInvalidNodeId),
15 owning_layer_id(Layer::INVALID_ID), 15 stable_id(0),
16 opacity(1.f), 16 opacity(1.f),
17 screen_space_opacity(1.f), 17 screen_space_opacity(1.f),
18 blend_mode(SkBlendMode::kSrcOver), 18 blend_mode(SkBlendMode::kSrcOver),
19 has_render_surface(false), 19 has_render_surface(false),
20 has_copy_request(false), 20 has_copy_request(false),
21 hidden_by_backface_visibility(false), 21 hidden_by_backface_visibility(false),
22 double_sided(false), 22 double_sided(false),
23 is_drawn(true), 23 is_drawn(true),
24 subtree_hidden(false), 24 subtree_hidden(false),
25 has_potential_filter_animation(false), 25 has_potential_filter_animation(false),
26 has_potential_opacity_animation(false), 26 has_potential_opacity_animation(false),
27 is_currently_animating_filter(false), 27 is_currently_animating_filter(false),
28 is_currently_animating_opacity(false), 28 is_currently_animating_opacity(false),
29 effect_changed(false), 29 effect_changed(false),
30 subtree_has_copy_request(0), 30 subtree_has_copy_request(0),
31 transform_id(0), 31 transform_id(0),
32 clip_id(0), 32 clip_id(0),
33 target_id(1), 33 target_id(1),
34 mask_layer_id(-1), 34 mask_layer_id(-1),
35 closest_ancestor_with_copy_request_id(-1) {} 35 closest_ancestor_with_copy_request_id(-1) {}
36 36
37 EffectNode::EffectNode(const EffectNode& other) = default; 37 EffectNode::EffectNode(const EffectNode& other) = default;
38 38
39 bool EffectNode::operator==(const EffectNode& other) const { 39 bool EffectNode::operator==(const EffectNode& other) const {
40 return id == other.id && parent_id == other.parent_id && 40 return id == other.id && parent_id == other.parent_id &&
41 owning_layer_id == other.owning_layer_id && opacity == other.opacity && 41 stable_id == other.stable_id && opacity == other.opacity &&
42 screen_space_opacity == other.screen_space_opacity && 42 screen_space_opacity == other.screen_space_opacity &&
43 has_render_surface == other.has_render_surface && 43 has_render_surface == other.has_render_surface &&
44 has_copy_request == other.has_copy_request && 44 has_copy_request == other.has_copy_request &&
45 filters == other.filters && 45 filters == other.filters &&
46 background_filters == other.background_filters && 46 background_filters == other.background_filters &&
47 filters_origin == other.filters_origin && 47 filters_origin == other.filters_origin &&
48 blend_mode == other.blend_mode && 48 blend_mode == other.blend_mode &&
49 surface_contents_scale == other.surface_contents_scale && 49 surface_contents_scale == other.surface_contents_scale &&
50 unscaled_mask_target_size == other.unscaled_mask_target_size && 50 unscaled_mask_target_size == other.unscaled_mask_target_size &&
51 hidden_by_backface_visibility == other.hidden_by_backface_visibility && 51 hidden_by_backface_visibility == other.hidden_by_backface_visibility &&
(...skipping 10 matching lines...) Expand all
62 subtree_has_copy_request == other.subtree_has_copy_request && 62 subtree_has_copy_request == other.subtree_has_copy_request &&
63 transform_id == other.transform_id && clip_id == other.clip_id && 63 transform_id == other.transform_id && clip_id == other.clip_id &&
64 target_id == other.target_id && mask_layer_id == other.mask_layer_id && 64 target_id == other.target_id && mask_layer_id == other.mask_layer_id &&
65 closest_ancestor_with_copy_request_id == 65 closest_ancestor_with_copy_request_id ==
66 other.closest_ancestor_with_copy_request_id; 66 other.closest_ancestor_with_copy_request_id;
67 } 67 }
68 68
69 void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const { 69 void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const {
70 value->SetInteger("id", id); 70 value->SetInteger("id", id);
71 value->SetInteger("parent_id", parent_id); 71 value->SetInteger("parent_id", parent_id);
72 value->SetInteger("owning_layer_id", owning_layer_id); 72 value->SetInteger("stable_id", stable_id);
73 value->SetDouble("opacity", opacity); 73 value->SetDouble("opacity", opacity);
74 value->SetBoolean("has_render_surface", has_render_surface); 74 value->SetBoolean("has_render_surface", has_render_surface);
75 value->SetBoolean("has_copy_request", has_copy_request); 75 value->SetBoolean("has_copy_request", has_copy_request);
76 value->SetBoolean("double_sided", double_sided); 76 value->SetBoolean("double_sided", double_sided);
77 value->SetBoolean("is_drawn", is_drawn); 77 value->SetBoolean("is_drawn", is_drawn);
78 value->SetBoolean("has_potential_filter_animation", 78 value->SetBoolean("has_potential_filter_animation",
79 has_potential_filter_animation); 79 has_potential_filter_animation);
80 value->SetBoolean("has_potential_opacity_animation", 80 value->SetBoolean("has_potential_opacity_animation",
81 has_potential_opacity_animation); 81 has_potential_opacity_animation);
82 value->SetBoolean("effect_changed", effect_changed); 82 value->SetBoolean("effect_changed", effect_changed);
83 value->SetInteger("subtree_has_copy_request", subtree_has_copy_request); 83 value->SetInteger("subtree_has_copy_request", subtree_has_copy_request);
84 value->SetInteger("transform_id", transform_id); 84 value->SetInteger("transform_id", transform_id);
85 value->SetInteger("clip_id", clip_id); 85 value->SetInteger("clip_id", clip_id);
86 value->SetInteger("target_id", target_id); 86 value->SetInteger("target_id", target_id);
87 value->SetInteger("mask_layer_id", mask_layer_id); 87 value->SetInteger("mask_layer_id", mask_layer_id);
88 value->SetInteger("closest_ancestor_with_copy_request_id", 88 value->SetInteger("closest_ancestor_with_copy_request_id",
89 closest_ancestor_with_copy_request_id); 89 closest_ancestor_with_copy_request_id);
90 } 90 }
91 91
92 } // namespace cc 92 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/effect_node.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698