OLD | NEW |
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 { |
(...skipping 13 matching lines...) Expand all Loading... |
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 | 36 |
36 EffectNode::EffectNode(const EffectNode& other) = default; | 37 EffectNode::EffectNode(const EffectNode& other) = default; |
37 | 38 |
38 bool EffectNode::operator==(const EffectNode& other) const { | 39 bool EffectNode::operator==(const EffectNode& other) const { |
39 return id == other.id && parent_id == other.parent_id && | 40 return id == other.id && parent_id == other.parent_id && |
40 owning_layer_id == other.owning_layer_id && opacity == other.opacity && | 41 owning_layer_id == other.owning_layer_id && opacity == other.opacity && |
41 screen_space_opacity == other.screen_space_opacity && | 42 screen_space_opacity == other.screen_space_opacity && |
42 has_render_surface == other.has_render_surface && | 43 has_render_surface == other.has_render_surface && |
43 has_copy_request == other.has_copy_request && | 44 has_copy_request == other.has_copy_request && |
44 filters == other.filters && | 45 filters == other.filters && |
45 background_filters == other.background_filters && | 46 background_filters == other.background_filters && |
46 filters_origin == other.filters_origin && | 47 filters_origin == other.filters_origin && |
47 blend_mode == other.blend_mode && | 48 blend_mode == other.blend_mode && |
48 surface_contents_scale == other.surface_contents_scale && | 49 surface_contents_scale == other.surface_contents_scale && |
49 unscaled_mask_target_size == other.unscaled_mask_target_size && | 50 unscaled_mask_target_size == other.unscaled_mask_target_size && |
50 hidden_by_backface_visibility == other.hidden_by_backface_visibility && | 51 hidden_by_backface_visibility == other.hidden_by_backface_visibility && |
51 double_sided == other.double_sided && is_drawn == other.is_drawn && | 52 double_sided == other.double_sided && is_drawn == other.is_drawn && |
52 subtree_hidden == other.subtree_hidden && | 53 subtree_hidden == other.subtree_hidden && |
53 has_potential_filter_animation == | 54 has_potential_filter_animation == |
54 other.has_potential_filter_animation && | 55 other.has_potential_filter_animation && |
55 has_potential_opacity_animation == | 56 has_potential_opacity_animation == |
56 other.has_potential_opacity_animation && | 57 other.has_potential_opacity_animation && |
57 is_currently_animating_filter == other.is_currently_animating_filter && | 58 is_currently_animating_filter == other.is_currently_animating_filter && |
58 is_currently_animating_opacity == | 59 is_currently_animating_opacity == |
59 other.is_currently_animating_opacity && | 60 other.is_currently_animating_opacity && |
60 effect_changed == other.effect_changed && | 61 effect_changed == other.effect_changed && |
61 subtree_has_copy_request == other.subtree_has_copy_request && | 62 subtree_has_copy_request == other.subtree_has_copy_request && |
62 transform_id == other.transform_id && clip_id == other.clip_id && | 63 transform_id == other.transform_id && clip_id == other.clip_id && |
63 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 == |
| 66 other.closest_ancestor_with_copy_request_id; |
64 } | 67 } |
65 | 68 |
66 void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const { | 69 void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const { |
67 value->SetInteger("id", id); | 70 value->SetInteger("id", id); |
68 value->SetInteger("parent_id", parent_id); | 71 value->SetInteger("parent_id", parent_id); |
69 value->SetInteger("owning_layer_id", owning_layer_id); | 72 value->SetInteger("owning_layer_id", owning_layer_id); |
70 value->SetDouble("opacity", opacity); | 73 value->SetDouble("opacity", opacity); |
71 value->SetBoolean("has_render_surface", has_render_surface); | 74 value->SetBoolean("has_render_surface", has_render_surface); |
72 value->SetBoolean("has_copy_request", has_copy_request); | 75 value->SetBoolean("has_copy_request", has_copy_request); |
73 value->SetBoolean("double_sided", double_sided); | 76 value->SetBoolean("double_sided", double_sided); |
74 value->SetBoolean("is_drawn", is_drawn); | 77 value->SetBoolean("is_drawn", is_drawn); |
75 value->SetBoolean("has_potential_filter_animation", | 78 value->SetBoolean("has_potential_filter_animation", |
76 has_potential_filter_animation); | 79 has_potential_filter_animation); |
77 value->SetBoolean("has_potential_opacity_animation", | 80 value->SetBoolean("has_potential_opacity_animation", |
78 has_potential_opacity_animation); | 81 has_potential_opacity_animation); |
79 value->SetBoolean("effect_changed", effect_changed); | 82 value->SetBoolean("effect_changed", effect_changed); |
80 value->SetInteger("subtree_has_copy_request", subtree_has_copy_request); | 83 value->SetInteger("subtree_has_copy_request", subtree_has_copy_request); |
81 value->SetInteger("transform_id", transform_id); | 84 value->SetInteger("transform_id", transform_id); |
82 value->SetInteger("clip_id", clip_id); | 85 value->SetInteger("clip_id", clip_id); |
83 value->SetInteger("target_id", target_id); | 86 value->SetInteger("target_id", target_id); |
84 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", |
| 89 closest_ancestor_with_copy_request_id); |
85 } | 90 } |
86 | 91 |
87 } // namespace cc | 92 } // namespace cc |
OLD | NEW |