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

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

Issue 2490273004: Move cc::ClipNode::target_is_clipped to cc::EffectNode (Closed)
Patch Set: one more todo comment Created 4 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 | « cc/trees/effect_node.h ('k') | cc/trees/property_tree_builder.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/proto/gfx_conversions.h" 6 #include "cc/proto/gfx_conversions.h"
7 #include "cc/proto/skia_conversions.h" 7 #include "cc/proto/skia_conversions.h"
8 #include "cc/trees/effect_node.h" 8 #include "cc/trees/effect_node.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 EffectNode::EffectNode() 12 EffectNode::EffectNode()
13 : id(-1), 13 : id(-1),
14 parent_id(-1), 14 parent_id(-1),
15 owner_id(-1), 15 owner_id(-1),
16 opacity(1.f), 16 opacity(1.f),
17 screen_space_opacity(1.f), 17 screen_space_opacity(1.f),
18 blend_mode(SkXfermode::kSrcOver_Mode), 18 blend_mode(SkXfermode::kSrcOver_Mode),
19 has_render_surface(false), 19 has_render_surface(false),
20 render_surface(nullptr), 20 render_surface(nullptr),
21 surface_is_clipped(false),
21 has_copy_request(false), 22 has_copy_request(false),
22 hidden_by_backface_visibility(false), 23 hidden_by_backface_visibility(false),
23 double_sided(false), 24 double_sided(false),
24 is_drawn(true), 25 is_drawn(true),
25 subtree_hidden(false), 26 subtree_hidden(false),
26 has_potential_filter_animation(false), 27 has_potential_filter_animation(false),
27 has_potential_opacity_animation(false), 28 has_potential_opacity_animation(false),
28 is_currently_animating_filter(false), 29 is_currently_animating_filter(false),
29 is_currently_animating_opacity(false), 30 is_currently_animating_opacity(false),
30 effect_changed(false), 31 effect_changed(false),
31 num_copy_requests_in_subtree(0), 32 num_copy_requests_in_subtree(0),
32 has_unclipped_descendants(false), 33 has_unclipped_descendants(false),
33 transform_id(0), 34 transform_id(0),
34 clip_id(0), 35 clip_id(0),
35 target_id(1), 36 target_id(1),
36 mask_layer_id(-1) {} 37 mask_layer_id(-1) {}
37 38
38 EffectNode::EffectNode(const EffectNode& other) = default; 39 EffectNode::EffectNode(const EffectNode& other) = default;
39 40
40 bool EffectNode::operator==(const EffectNode& other) const { 41 bool EffectNode::operator==(const EffectNode& other) const {
41 return id == other.id && parent_id == other.parent_id && 42 return id == other.id && parent_id == other.parent_id &&
42 owner_id == other.owner_id && opacity == other.opacity && 43 owner_id == other.owner_id && opacity == other.opacity &&
43 screen_space_opacity == other.screen_space_opacity && 44 screen_space_opacity == other.screen_space_opacity &&
44 has_render_surface == other.has_render_surface && 45 has_render_surface == other.has_render_surface &&
46 surface_is_clipped == other.surface_is_clipped &&
45 has_copy_request == other.has_copy_request && 47 has_copy_request == other.has_copy_request &&
46 filters == other.filters && 48 filters == other.filters &&
47 background_filters == other.background_filters && 49 background_filters == other.background_filters &&
48 filters_origin == other.filters_origin && 50 filters_origin == other.filters_origin &&
49 blend_mode == other.blend_mode && 51 blend_mode == other.blend_mode &&
50 surface_contents_scale == other.surface_contents_scale && 52 surface_contents_scale == other.surface_contents_scale &&
51 unscaled_mask_target_size == other.unscaled_mask_target_size && 53 unscaled_mask_target_size == other.unscaled_mask_target_size &&
52 hidden_by_backface_visibility == other.hidden_by_backface_visibility && 54 hidden_by_backface_visibility == other.hidden_by_backface_visibility &&
53 double_sided == other.double_sided && is_drawn == other.is_drawn && 55 double_sided == other.double_sided && is_drawn == other.is_drawn &&
54 subtree_hidden == other.subtree_hidden && 56 subtree_hidden == other.subtree_hidden &&
55 has_potential_filter_animation == 57 has_potential_filter_animation ==
56 other.has_potential_filter_animation && 58 other.has_potential_filter_animation &&
57 has_potential_opacity_animation == 59 has_potential_opacity_animation ==
58 other.has_potential_opacity_animation && 60 other.has_potential_opacity_animation &&
59 is_currently_animating_filter == other.is_currently_animating_filter && 61 is_currently_animating_filter == other.is_currently_animating_filter &&
60 is_currently_animating_opacity == 62 is_currently_animating_opacity ==
61 other.is_currently_animating_opacity && 63 other.is_currently_animating_opacity &&
62 effect_changed == other.effect_changed && 64 effect_changed == other.effect_changed &&
63 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree && 65 num_copy_requests_in_subtree == other.num_copy_requests_in_subtree &&
64 transform_id == other.transform_id && clip_id == other.clip_id && 66 transform_id == other.transform_id && clip_id == other.clip_id &&
65 target_id == other.target_id && mask_layer_id == other.mask_layer_id; 67 target_id == other.target_id && mask_layer_id == other.mask_layer_id;
66 } 68 }
67 69
68 void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const { 70 void EffectNode::AsValueInto(base::trace_event::TracedValue* value) const {
69 value->SetInteger("id", id); 71 value->SetInteger("id", id);
70 value->SetInteger("parent_id", parent_id); 72 value->SetInteger("parent_id", parent_id);
71 value->SetInteger("owner_id", owner_id); 73 value->SetInteger("owner_id", owner_id);
72 value->SetDouble("opacity", opacity); 74 value->SetDouble("opacity", opacity);
73 value->SetBoolean("has_render_surface", has_render_surface); 75 value->SetBoolean("has_render_surface", has_render_surface);
76 value->SetBoolean("surface_is_clipped", surface_is_clipped);
74 value->SetBoolean("has_copy_request", has_copy_request); 77 value->SetBoolean("has_copy_request", has_copy_request);
75 value->SetBoolean("double_sided", double_sided); 78 value->SetBoolean("double_sided", double_sided);
76 value->SetBoolean("is_drawn", is_drawn); 79 value->SetBoolean("is_drawn", is_drawn);
77 value->SetBoolean("has_potential_filter_animation", 80 value->SetBoolean("has_potential_filter_animation",
78 has_potential_filter_animation); 81 has_potential_filter_animation);
79 value->SetBoolean("has_potential_opacity_animation", 82 value->SetBoolean("has_potential_opacity_animation",
80 has_potential_opacity_animation); 83 has_potential_opacity_animation);
81 value->SetBoolean("effect_changed", effect_changed); 84 value->SetBoolean("effect_changed", effect_changed);
82 value->SetInteger("num_copy_requests_in_subtree", 85 value->SetInteger("num_copy_requests_in_subtree",
83 num_copy_requests_in_subtree); 86 num_copy_requests_in_subtree);
84 value->SetInteger("transform_id", transform_id); 87 value->SetInteger("transform_id", transform_id);
85 value->SetInteger("clip_id", clip_id); 88 value->SetInteger("clip_id", clip_id);
86 value->SetInteger("target_id", target_id); 89 value->SetInteger("target_id", target_id);
87 value->SetInteger("mask_layer_id", mask_layer_id); 90 value->SetInteger("mask_layer_id", mask_layer_id);
88 } 91 }
89 92
90 } // namespace cc 93 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/effect_node.h ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698