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

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

Issue 2299533002: WIP: Construct SPV2's scroll paint property tree (Closed)
Patch Set: Add more paint property builder tests, update comments/documentation" Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/frame/FrameView.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 #ifndef CC_TREES_SCROLL_NODE_H_ 5 #ifndef CC_TREES_SCROLL_NODE_H_
6 #define CC_TREES_SCROLL_NODE_H_ 6 #define CC_TREES_SCROLL_NODE_H_
7 7
8 #include "cc/base/cc_export.h" 8 #include "cc/base/cc_export.h"
9 #include "cc/output/filter_operations.h" 9 #include "cc/output/filter_operations.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
11 11
12 namespace base { 12 namespace base {
13 namespace trace_event { 13 namespace trace_event {
14 class TracedValue; 14 class TracedValue;
15 } // namespace trace_event 15 } // namespace trace_event
16 } // namespace base 16 } // namespace base
17 17
18 namespace cc { 18 namespace cc {
19 19
20 namespace proto { 20 namespace proto {
21 class TreeNode; 21 class TreeNode;
22 } // namespace proto 22 } // namespace proto
23 23
24 struct CC_EXPORT ScrollNode { 24 struct CC_EXPORT ScrollNode {
25 ScrollNode(); 25 ScrollNode();
26 ScrollNode(const ScrollNode& other); 26 ScrollNode(const ScrollNode& other);
27 27
28 int id; 28 int id;
29 int parent_id; 29 int parent_id;
30
31 // The layer id that corresponds to the layer contents that are scrolled.
30 int owner_id; 32 int owner_id;
31 33
34 // This is used to delineate a subtree that should not be scrolled. For
35 // example, when there is a layer that is not scrollable itself but is inside
36 // a scrolling layer.
32 bool scrollable; 37 bool scrollable;
38
33 uint32_t main_thread_scrolling_reasons; 39 uint32_t main_thread_scrolling_reasons;
34 bool contains_non_fast_scrollable_region; 40 bool contains_non_fast_scrollable_region;
41
42 // Size of the clipped area, not including non-overlay scrollbars. Overlay
43 // scrollbars do not affect the clipped area.
35 gfx::Size scroll_clip_layer_bounds; 44 gfx::Size scroll_clip_layer_bounds;
45
46 // Bounds of the overflow scrolling area.
36 gfx::Size bounds; 47 gfx::Size bounds;
48
37 bool max_scroll_offset_affected_by_page_scale; 49 bool max_scroll_offset_affected_by_page_scale;
38 bool is_inner_viewport_scroll_layer; 50 bool is_inner_viewport_scroll_layer;
39 bool is_outer_viewport_scroll_layer; 51 bool is_outer_viewport_scroll_layer;
52
53 // This offset is used when |scrollable| is false and there isn't a transform
54 // already present that covers this offset.
40 gfx::Vector2dF offset_to_transform_parent; 55 gfx::Vector2dF offset_to_transform_parent;
56
41 bool should_flatten; 57 bool should_flatten;
42 bool user_scrollable_horizontal; 58 bool user_scrollable_horizontal;
43 bool user_scrollable_vertical; 59 bool user_scrollable_vertical;
44 ElementId element_id; 60 ElementId element_id;
45 int transform_id; 61 int transform_id;
62
46 // Number of drawn layers pointing to this node or any of its descendants. 63 // Number of drawn layers pointing to this node or any of its descendants.
47 int num_drawn_descendants; 64 int num_drawn_descendants;
48 65
49 bool operator==(const ScrollNode& other) const; 66 bool operator==(const ScrollNode& other) const;
50 67
51 void ToProtobuf(proto::TreeNode* proto) const; 68 void ToProtobuf(proto::TreeNode* proto) const;
52 void FromProtobuf(const proto::TreeNode& proto); 69 void FromProtobuf(const proto::TreeNode& proto);
53 void AsValueInto(base::trace_event::TracedValue* value) const; 70 void AsValueInto(base::trace_event::TracedValue* value) const;
54 }; 71 };
55 72
56 } // namespace cc 73 } // namespace cc
57 74
58 #endif // CC_TREES_SCROLL_NODE_H_ 75 #endif // CC_TREES_SCROLL_NODE_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698