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

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

Issue 2612883002: Rename cc property tree node owner_id to owning_layer_id. (Closed)
Patch Set: Created 3 years, 11 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/scroll_node.h ('k') | cc/trees/transform_node.h » ('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/base/math_util.h" 6 #include "cc/base/math_util.h"
7 #include "cc/input/main_thread_scrolling_reason.h" 7 #include "cc/input/main_thread_scrolling_reason.h"
8 #include "cc/proto/gfx_conversions.h" 8 #include "cc/proto/gfx_conversions.h"
9 #include "cc/trees/element_id.h" 9 #include "cc/trees/element_id.h"
10 #include "cc/trees/scroll_node.h" 10 #include "cc/trees/scroll_node.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 ScrollNode::ScrollNode() 14 ScrollNode::ScrollNode()
15 : id(-1), 15 : id(-1),
16 parent_id(-1), 16 parent_id(-1),
17 owner_id(-1), 17 owning_layer_id(-1),
18 scrollable(false), 18 scrollable(false),
19 main_thread_scrolling_reasons( 19 main_thread_scrolling_reasons(
20 MainThreadScrollingReason::kNotScrollingOnMain), 20 MainThreadScrollingReason::kNotScrollingOnMain),
21 contains_non_fast_scrollable_region(false), 21 contains_non_fast_scrollable_region(false),
22 max_scroll_offset_affected_by_page_scale(false), 22 max_scroll_offset_affected_by_page_scale(false),
23 is_inner_viewport_scroll_layer(false), 23 is_inner_viewport_scroll_layer(false),
24 is_outer_viewport_scroll_layer(false), 24 is_outer_viewport_scroll_layer(false),
25 should_flatten(false), 25 should_flatten(false),
26 user_scrollable_horizontal(false), 26 user_scrollable_horizontal(false),
27 user_scrollable_vertical(false), 27 user_scrollable_vertical(false),
28 transform_id(0) {} 28 transform_id(0) {}
29 29
30 ScrollNode::ScrollNode(const ScrollNode& other) = default; 30 ScrollNode::ScrollNode(const ScrollNode& other) = default;
31 31
32 bool ScrollNode::operator==(const ScrollNode& other) const { 32 bool ScrollNode::operator==(const ScrollNode& other) const {
33 return id == other.id && parent_id == other.parent_id && 33 return id == other.id && parent_id == other.parent_id &&
34 owner_id == other.owner_id && scrollable == other.scrollable && 34 owning_layer_id == other.owning_layer_id &&
35 scrollable == other.scrollable &&
35 main_thread_scrolling_reasons == other.main_thread_scrolling_reasons && 36 main_thread_scrolling_reasons == other.main_thread_scrolling_reasons &&
36 contains_non_fast_scrollable_region == 37 contains_non_fast_scrollable_region ==
37 other.contains_non_fast_scrollable_region && 38 other.contains_non_fast_scrollable_region &&
38 scroll_clip_layer_bounds == other.scroll_clip_layer_bounds && 39 scroll_clip_layer_bounds == other.scroll_clip_layer_bounds &&
39 bounds == other.bounds && 40 bounds == other.bounds &&
40 max_scroll_offset_affected_by_page_scale == 41 max_scroll_offset_affected_by_page_scale ==
41 other.max_scroll_offset_affected_by_page_scale && 42 other.max_scroll_offset_affected_by_page_scale &&
42 is_inner_viewport_scroll_layer == 43 is_inner_viewport_scroll_layer ==
43 other.is_inner_viewport_scroll_layer && 44 other.is_inner_viewport_scroll_layer &&
44 is_outer_viewport_scroll_layer == 45 is_outer_viewport_scroll_layer ==
45 other.is_outer_viewport_scroll_layer && 46 other.is_outer_viewport_scroll_layer &&
46 offset_to_transform_parent == other.offset_to_transform_parent && 47 offset_to_transform_parent == other.offset_to_transform_parent &&
47 should_flatten == other.should_flatten && 48 should_flatten == other.should_flatten &&
48 user_scrollable_horizontal == other.user_scrollable_horizontal && 49 user_scrollable_horizontal == other.user_scrollable_horizontal &&
49 user_scrollable_vertical == other.user_scrollable_vertical && 50 user_scrollable_vertical == other.user_scrollable_vertical &&
50 element_id == other.element_id && transform_id == other.transform_id; 51 element_id == other.element_id && transform_id == other.transform_id;
51 } 52 }
52 53
53 void ScrollNode::AsValueInto(base::trace_event::TracedValue* value) const { 54 void ScrollNode::AsValueInto(base::trace_event::TracedValue* value) const {
54 value->SetInteger("id", id); 55 value->SetInteger("id", id);
55 value->SetInteger("parent_id", parent_id); 56 value->SetInteger("parent_id", parent_id);
56 value->SetInteger("owner_id", owner_id); 57 value->SetInteger("owning_layer_id", owning_layer_id);
57 value->SetBoolean("scrollable", scrollable); 58 value->SetBoolean("scrollable", scrollable);
58 MathUtil::AddToTracedValue("scroll_clip_layer_bounds", 59 MathUtil::AddToTracedValue("scroll_clip_layer_bounds",
59 scroll_clip_layer_bounds, value); 60 scroll_clip_layer_bounds, value);
60 MathUtil::AddToTracedValue("bounds", bounds, value); 61 MathUtil::AddToTracedValue("bounds", bounds, value);
61 MathUtil::AddToTracedValue("offset_to_transform_parent", 62 MathUtil::AddToTracedValue("offset_to_transform_parent",
62 offset_to_transform_parent, value); 63 offset_to_transform_parent, value);
63 value->SetBoolean("should_flatten", should_flatten); 64 value->SetBoolean("should_flatten", should_flatten);
64 value->SetBoolean("user_scrollable_horizontal", user_scrollable_horizontal); 65 value->SetBoolean("user_scrollable_horizontal", user_scrollable_horizontal);
65 value->SetBoolean("user_scrollable_vertical", user_scrollable_vertical); 66 value->SetBoolean("user_scrollable_vertical", user_scrollable_vertical);
66 67
67 element_id.AddToTracedValue(value); 68 element_id.AddToTracedValue(value);
68 value->SetInteger("transform_id", transform_id); 69 value->SetInteger("transform_id", transform_id);
69 } 70 }
70 71
71 } // namespace cc 72 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/scroll_node.h ('k') | cc/trees/transform_node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698