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

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

Issue 2040543002: Take MT jank into account when animating the scroll offset on CC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_INPUT_HANDLER_H_ 5 #ifndef CC_INPUT_INPUT_HANDLER_H_
6 #define CC_INPUT_INPUT_HANDLER_H_ 6 #define CC_INPUT_INPUT_HANDLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ScrollInputType type) = 0; 125 ScrollInputType type) = 0;
126 126
127 // Returns SCROLL_ON_IMPL_THREAD if a layer is actively being scrolled or 127 // Returns SCROLL_ON_IMPL_THREAD if a layer is actively being scrolled or
128 // a subsequent call to ScrollAnimated can begin on the impl thread. 128 // a subsequent call to ScrollAnimated can begin on the impl thread.
129 virtual ScrollStatus ScrollAnimatedBegin( 129 virtual ScrollStatus ScrollAnimatedBegin(
130 const gfx::Point& viewport_point) = 0; 130 const gfx::Point& viewport_point) = 0;
131 131
132 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point, 132 virtual ScrollStatus ScrollAnimated(const gfx::Point& viewport_point,
133 const gfx::Vector2dF& scroll_delta) = 0; 133 const gfx::Vector2dF& scroll_delta) = 0;
134 134
135 virtual void AdjustDuration(base::TimeDelta) = 0;
skobes 2016/06/08 22:47:28 I don't think we should ever adjust the duration a
136
135 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta. 137 // Scroll the layer selected by |ScrollBegin| by given |scroll_state| delta.
136 // Internally, the delta is transformed to local layer's coordinate space for 138 // Internally, the delta is transformed to local layer's coordinate space for
137 // scrolls gestures that are direct manipulation (e.g. touch). If there is no 139 // scrolls gestures that are direct manipulation (e.g. touch). If there is no
138 // room to move the layer in the requested direction, its first ancestor layer 140 // room to move the layer in the requested direction, its first ancestor layer
139 // that can be scrolled will be moved instead. The return value's |did_scroll| 141 // that can be scrolled will be moved instead. The return value's |did_scroll|
140 // field is set to false if no layer can be moved in the requested direction 142 // field is set to false if no layer can be moved in the requested direction
141 // at all, and set to true if any layer is moved. If the scroll delta hits the 143 // at all, and set to true if any layer is moved. If the scroll delta hits the
142 // root layer, and the layer can no longer move, the root overscroll 144 // root layer, and the layer can no longer move, the root overscroll
143 // accumulated within this ScrollBegin() scope is reported in the return 145 // accumulated within this ScrollBegin() scope is reported in the return
144 // value's |accumulated_overscroll| field. Should only be called if 146 // value's |accumulated_overscroll| field. Should only be called if
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 InputHandler() {} 205 InputHandler() {}
204 virtual ~InputHandler() {} 206 virtual ~InputHandler() {}
205 207
206 private: 208 private:
207 DISALLOW_COPY_AND_ASSIGN(InputHandler); 209 DISALLOW_COPY_AND_ASSIGN(InputHandler);
208 }; 210 };
209 211
210 } // namespace cc 212 } // namespace cc
211 213
212 #endif // CC_INPUT_INPUT_HANDLER_H_ 214 #endif // CC_INPUT_INPUT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698