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

Side by Side Diff: cc/layers/layer.h

Issue 1680613002: Adding momentum/overscroll to views:: ScrollViews Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Tableview layout. aaaand I think we are done Created 4 years, 4 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/input/scroll_state.h ('k') | cc/layers/layer.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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_LAYERS_LAYER_H_ 5 #ifndef CC_LAYERS_LAYER_H_
6 #define CC_LAYERS_LAYER_H_ 6 #define CC_LAYERS_LAYER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 void set_num_unclipped_descendants(size_t descendants) { 226 void set_num_unclipped_descendants(size_t descendants) {
227 num_unclipped_descendants_ = descendants; 227 num_unclipped_descendants_ = descendants;
228 } 228 }
229 size_t num_unclipped_descendants() const { 229 size_t num_unclipped_descendants() const {
230 return num_unclipped_descendants_; 230 return num_unclipped_descendants_;
231 } 231 }
232 232
233 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); 233 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset);
234 234
235 gfx::ScrollOffset scroll_offset() const { return inputs_.scroll_offset; } 235 gfx::ScrollOffset scroll_offset() const { return inputs_.scroll_offset; }
236 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); 236 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset,
237 gfx::Vector2dF* overscroll_delta);
237 238
238 void SetScrollClipLayerId(int clip_layer_id); 239 // TODO(tapted): Remove this overload.
240 void SetScrollClipLayerId(int clip_layer_id) {
241 SetScrollClipAndCanOverscroll(clip_layer_id, false);
242 }
243 void SetScrollClipAndCanOverscroll(int clip_layer_id, bool can_overscroll);
244
239 bool scrollable() const { return inputs_.scroll_clip_layer_id != INVALID_ID; } 245 bool scrollable() const { return inputs_.scroll_clip_layer_id != INVALID_ID; }
246 gfx::ScrollOffset overscroll() const { return inputs_.overscroll; }
240 Layer* scroll_clip_layer() const; 247 Layer* scroll_clip_layer() const;
241 248
242 void SetUserScrollable(bool horizontal, bool vertical); 249 void SetUserScrollable(bool horizontal, bool vertical);
243 bool user_scrollable_horizontal() const { 250 bool user_scrollable_horizontal() const {
244 return inputs_.user_scrollable_horizontal; 251 return inputs_.user_scrollable_horizontal;
245 } 252 }
246 bool user_scrollable_vertical() const { 253 bool user_scrollable_vertical() const {
247 return inputs_.user_scrollable_vertical; 254 return inputs_.user_scrollable_vertical;
248 } 255 }
249 256
(...skipping 22 matching lines...) Expand all
272 } 279 }
273 280
274 void SetForceRenderSurfaceForTesting(bool force_render_surface); 281 void SetForceRenderSurfaceForTesting(bool force_render_surface);
275 bool force_render_surface_for_testing() const { 282 bool force_render_surface_for_testing() const {
276 return force_render_surface_for_testing_; 283 return force_render_surface_for_testing_;
277 } 284 }
278 285
279 gfx::ScrollOffset CurrentScrollOffset() const { 286 gfx::ScrollOffset CurrentScrollOffset() const {
280 return inputs_.scroll_offset; 287 return inputs_.scroll_offset;
281 } 288 }
289 gfx::ScrollOffset CurrentOverscroll() const { return inputs_.overscroll; }
282 290
283 void SetDoubleSided(bool double_sided); 291 void SetDoubleSided(bool double_sided);
284 bool double_sided() const { return inputs_.double_sided; } 292 bool double_sided() const { return inputs_.double_sided; }
285 293
286 void SetShouldFlattenTransform(bool flatten); 294 void SetShouldFlattenTransform(bool flatten);
287 bool should_flatten_transform() const { 295 bool should_flatten_transform() const {
288 return inputs_.should_flatten_transform; 296 return inputs_.should_flatten_transform;
289 } 297 }
290 298
291 bool Is3dSorted() const { return inputs_.sorting_context_id != 0; } 299 bool Is3dSorted() const { return inputs_.sorting_context_id != 0; }
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 int sorting_context_id; 653 int sorting_context_id;
646 654
647 bool use_parent_backface_visibility : 1; 655 bool use_parent_backface_visibility : 1;
648 656
649 SkColor background_color; 657 SkColor background_color;
650 658
651 FilterOperations filters; 659 FilterOperations filters;
652 FilterOperations background_filters; 660 FilterOperations background_filters;
653 661
654 gfx::ScrollOffset scroll_offset; 662 gfx::ScrollOffset scroll_offset;
663 gfx::ScrollOffset overscroll;
655 664
656 // This variable indicates which ancestor layer (if any) whose size, 665 // This variable indicates which ancestor layer (if any) whose size,
657 // transformed relative to this layer, defines the maximum scroll offset 666 // transformed relative to this layer, defines the maximum scroll offset
658 // for this layer. 667 // for this layer.
659 int scroll_clip_layer_id; 668 int scroll_clip_layer_id;
660 bool user_scrollable_horizontal : 1; 669 bool user_scrollable_horizontal : 1;
661 bool user_scrollable_vertical : 1; 670 bool user_scrollable_vertical : 1;
671 bool can_overscroll : 1;
662 672
663 uint32_t main_thread_scrolling_reasons; 673 uint32_t main_thread_scrolling_reasons;
664 Region non_fast_scrollable_region; 674 Region non_fast_scrollable_region;
665 675
666 Region touch_event_handler_region; 676 Region touch_event_handler_region;
667 677
668 bool is_container_for_fixed_position_layers : 1; 678 bool is_container_for_fixed_position_layers : 1;
669 LayerPositionConstraint position_constraint; 679 LayerPositionConstraint position_constraint;
670 680
671 ElementId element_id; 681 ElementId element_id;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // These all act like draw properties, so don't need push properties. 731 // These all act like draw properties, so don't need push properties.
722 gfx::Rect visible_layer_rect_; 732 gfx::Rect visible_layer_rect_;
723 size_t num_unclipped_descendants_; 733 size_t num_unclipped_descendants_;
724 734
725 DISALLOW_COPY_AND_ASSIGN(Layer); 735 DISALLOW_COPY_AND_ASSIGN(Layer);
726 }; 736 };
727 737
728 } // namespace cc 738 } // namespace cc
729 739
730 #endif // CC_LAYERS_LAYER_H_ 740 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/input/scroll_state.h ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698