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

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

Issue 2680953002: Remove GraphicsLayer::didScroll and directly call ScrollableArea::didScroll (Closed)
Patch Set: Incorporate reviewer comments: more tests, less bad tests Created 3 years, 10 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/blink/web_layer_impl.cc ('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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); 244 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region);
245 const Region& non_fast_scrollable_region() const { 245 const Region& non_fast_scrollable_region() const {
246 return inputs_.non_fast_scrollable_region; 246 return inputs_.non_fast_scrollable_region;
247 } 247 }
248 248
249 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); 249 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region);
250 const Region& touch_event_handler_region() const { 250 const Region& touch_event_handler_region() const {
251 return inputs_.touch_event_handler_region; 251 return inputs_.touch_event_handler_region;
252 } 252 }
253 253
254 void set_did_scroll_callback(const base::Closure& callback) { 254 void set_did_scroll_callback(
255 const base::Callback<void(const gfx::ScrollOffset&)>& callback) {
255 inputs_.did_scroll_callback = callback; 256 inputs_.did_scroll_callback = callback;
256 } 257 }
257 258
258 void SetForceRenderSurfaceForTesting(bool force_render_surface); 259 void SetForceRenderSurfaceForTesting(bool force_render_surface);
259 bool force_render_surface_for_testing() const { 260 bool force_render_surface_for_testing() const {
260 return force_render_surface_for_testing_; 261 return force_render_surface_for_testing_;
261 } 262 }
262 263
263 gfx::ScrollOffset CurrentScrollOffset() const { 264 gfx::ScrollOffset CurrentScrollOffset() const {
264 return inputs_.scroll_offset; 265 return inputs_.scroll_offset;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 Layer* scroll_parent; 608 Layer* scroll_parent;
608 Layer* clip_parent; 609 Layer* clip_parent;
609 610
610 bool has_will_change_transform_hint : 1; 611 bool has_will_change_transform_hint : 1;
611 bool has_preferred_raster_bounds : 1; 612 bool has_preferred_raster_bounds : 1;
612 613
613 bool hide_layer_and_subtree : 1; 614 bool hide_layer_and_subtree : 1;
614 615
615 // The following elements can not and are not serialized. 616 // The following elements can not and are not serialized.
616 LayerClient* client; 617 LayerClient* client;
617 base::Closure did_scroll_callback; 618 base::Callback<void(const gfx::ScrollOffset&)> did_scroll_callback;
618 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; 619 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
619 620
620 gfx::Size preferred_raster_bounds; 621 gfx::Size preferred_raster_bounds;
621 }; 622 };
622 623
623 Layer* parent_; 624 Layer* parent_;
624 625
625 // Layer instances have a weak pointer to their LayerTreeHost. 626 // Layer instances have a weak pointer to their LayerTreeHost.
626 // This pointer value is nil when a Layer is not in a tree and is 627 // This pointer value is nil when a Layer is not in a tree and is
627 // updated via SetLayerTreeHost() if a layer moves between trees. 628 // updated via SetLayerTreeHost() if a layer moves between trees.
(...skipping 28 matching lines...) Expand all
656 // These all act like draw properties, so don't need push properties. 657 // These all act like draw properties, so don't need push properties.
657 gfx::Rect visible_layer_rect_; 658 gfx::Rect visible_layer_rect_;
658 size_t num_unclipped_descendants_; 659 size_t num_unclipped_descendants_;
659 660
660 DISALLOW_COPY_AND_ASSIGN(Layer); 661 DISALLOW_COPY_AND_ASSIGN(Layer);
661 }; 662 };
662 663
663 } // namespace cc 664 } // namespace cc
664 665
665 #endif // CC_LAYERS_LAYER_H_ 666 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/layers/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698