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

Side by Side Diff: cc/input/scroll_state.h

Issue 2907053004: GSB uses delta_hints to calculate scrolling chain. (Closed)
Patch Set: Merge branch 'master' into GSB_checks_delta_hints Created 3 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_INPUT_SCROLL_STATE_H_ 5 #ifndef CC_INPUT_SCROLL_STATE_H_
6 #define CC_INPUT_SCROLL_STATE_H_ 6 #define CC_INPUT_SCROLL_STATE_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 // Reduce deltas by x, y. 28 // Reduce deltas by x, y.
29 void ConsumeDelta(double x, double y); 29 void ConsumeDelta(double x, double y);
30 // Pops the first layer off of |scroll_chain_| and calls 30 // Pops the first layer off of |scroll_chain_| and calls
31 // |DistributeScroll| on it. 31 // |DistributeScroll| on it.
32 void DistributeToScrollChainDescendant(); 32 void DistributeToScrollChainDescendant();
33 // Positive when scrolling right. 33 // Positive when scrolling right.
34 double delta_x() const { return data_.delta_x; } 34 double delta_x() const { return data_.delta_x; }
35 // Positive when scrolling down. 35 // Positive when scrolling down.
36 double delta_y() const { return data_.delta_y; } 36 double delta_y() const { return data_.delta_y; }
37 // Positive when scrolling right.
38 double delta_x_hint() const { return data_.delta_x_hint; }
39 // Positive when scrolling down.
40 double delta_y_hint() const { return data_.delta_y_hint; }
41 bool ignore_delta_hints() const { return data_.ignore_delta_hints; }
37 // The location associated with this scroll update. For touch, this is the 42 // The location associated with this scroll update. For touch, this is the
38 // position of the finger. For mouse, the location of the cursor. 43 // position of the finger. For mouse, the location of the cursor.
39 int position_x() const { return data_.position_x; } 44 int position_x() const { return data_.position_x; }
40 int position_y() const { return data_.position_y; } 45 int position_y() const { return data_.position_y; }
41 46
42 double velocity_x() const { return data_.velocity_x; } 47 double velocity_x() const { return data_.velocity_x; }
43 double velocity_y() const { return data_.velocity_y; } 48 double velocity_y() const { return data_.velocity_y; }
44 49
45 bool is_beginning() const { return data_.is_beginning; } 50 bool is_beginning() const { return data_.is_beginning; }
46 void set_is_beginning(bool is_beginning) { 51 void set_is_beginning(bool is_beginning) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 103
99 private: 104 private:
100 ScrollStateData data_; 105 ScrollStateData data_;
101 LayerTreeImpl* layer_tree_impl_; 106 LayerTreeImpl* layer_tree_impl_;
102 std::list<ScrollNode*> scroll_chain_; 107 std::list<ScrollNode*> scroll_chain_;
103 }; 108 };
104 109
105 } // namespace cc 110 } // namespace cc
106 111
107 #endif // CC_INPUT_SCROLL_STATE_H_ 112 #endif // CC_INPUT_SCROLL_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698