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

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

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combined rebase 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
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void set_num_unclipped_descendants(size_t descendants) { 222 void set_num_unclipped_descendants(size_t descendants) {
223 num_unclipped_descendants_ = descendants; 223 num_unclipped_descendants_ = descendants;
224 } 224 }
225 size_t num_unclipped_descendants() const { 225 size_t num_unclipped_descendants() const {
226 return num_unclipped_descendants_; 226 return num_unclipped_descendants_;
227 } 227 }
228 228
229 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset); 229 void SetScrollOffset(const gfx::ScrollOffset& scroll_offset);
230 230
231 gfx::ScrollOffset scroll_offset() const { return inputs_.scroll_offset; } 231 gfx::ScrollOffset scroll_offset() const { return inputs_.scroll_offset; }
232 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset); 232 void SetScrollOffsetFromImplSide(const gfx::ScrollOffset& scroll_offset,
233 gfx::Vector2dF* overscroll_delta);
233 234
234 void SetScrollClipLayerId(int clip_layer_id); 235 // TODO(tapted): Remove this overload.
236 void SetScrollClipLayerId(int clip_layer_id) {
237 SetScrollClipAndCanOverscroll(clip_layer_id, false);
238 }
239 void SetScrollClipAndCanOverscroll(int clip_layer_id, bool can_overscroll);
240
235 bool scrollable() const { return inputs_.scroll_clip_layer_id != INVALID_ID; } 241 bool scrollable() const { return inputs_.scroll_clip_layer_id != INVALID_ID; }
242 gfx::ScrollOffset overscroll() const { return inputs_.overscroll; }
236 Layer* scroll_clip_layer() const; 243 Layer* scroll_clip_layer() const;
237 244
238 void SetUserScrollable(bool horizontal, bool vertical); 245 void SetUserScrollable(bool horizontal, bool vertical);
239 bool user_scrollable_horizontal() const { 246 bool user_scrollable_horizontal() const {
240 return inputs_.user_scrollable_horizontal; 247 return inputs_.user_scrollable_horizontal;
241 } 248 }
242 bool user_scrollable_vertical() const { 249 bool user_scrollable_vertical() const {
243 return inputs_.user_scrollable_vertical; 250 return inputs_.user_scrollable_vertical;
244 } 251 }
245 252
(...skipping 22 matching lines...) Expand all
268 } 275 }
269 276
270 void SetForceRenderSurfaceForTesting(bool force_render_surface); 277 void SetForceRenderSurfaceForTesting(bool force_render_surface);
271 bool force_render_surface_for_testing() const { 278 bool force_render_surface_for_testing() const {
272 return force_render_surface_for_testing_; 279 return force_render_surface_for_testing_;
273 } 280 }
274 281
275 gfx::ScrollOffset CurrentScrollOffset() const { 282 gfx::ScrollOffset CurrentScrollOffset() const {
276 return inputs_.scroll_offset; 283 return inputs_.scroll_offset;
277 } 284 }
285 gfx::ScrollOffset CurrentOverscroll() const { return inputs_.overscroll; }
278 286
279 void SetDoubleSided(bool double_sided); 287 void SetDoubleSided(bool double_sided);
280 bool double_sided() const { return inputs_.double_sided; } 288 bool double_sided() const { return inputs_.double_sided; }
281 289
282 void SetShouldFlattenTransform(bool flatten); 290 void SetShouldFlattenTransform(bool flatten);
283 bool should_flatten_transform() const { 291 bool should_flatten_transform() const {
284 return inputs_.should_flatten_transform; 292 return inputs_.should_flatten_transform;
285 } 293 }
286 294
287 bool Is3dSorted() const { return inputs_.sorting_context_id != 0; } 295 bool Is3dSorted() const { return inputs_.sorting_context_id != 0; }
(...skipping 357 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') | ui/events/event_constants.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698