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

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

Issue 2676923002: End-to-end prototype of compositor scrolling with slimming paint v2 (Closed)
Patch Set: Add SPV2 test of didScroll callback 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
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 Layer* scroll_parent; 609 Layer* scroll_parent;
609 Layer* clip_parent; 610 Layer* clip_parent;
610 611
611 bool has_will_change_transform_hint : 1; 612 bool has_will_change_transform_hint : 1;
612 bool has_preferred_raster_bounds : 1; 613 bool has_preferred_raster_bounds : 1;
613 614
614 bool hide_layer_and_subtree : 1; 615 bool hide_layer_and_subtree : 1;
615 616
616 // The following elements can not and are not serialized. 617 // The following elements can not and are not serialized.
617 LayerClient* client; 618 LayerClient* client;
618 base::Closure did_scroll_callback; 619 base::Callback<void(const gfx::ScrollOffset&)> did_scroll_callback;
619 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests; 620 std::vector<std::unique_ptr<CopyOutputRequest>> copy_requests;
620 621
621 gfx::Size preferred_raster_bounds; 622 gfx::Size preferred_raster_bounds;
622 }; 623 };
623 624
624 Layer* parent_; 625 Layer* parent_;
625 626
626 // Layer instances have a weak pointer to their LayerTreeHost. 627 // Layer instances have a weak pointer to their LayerTreeHost.
627 // This pointer value is nil when a Layer is not in a tree and is 628 // This pointer value is nil when a Layer is not in a tree and is
628 // updated via SetLayerTreeHost() if a layer moves between trees. 629 // updated via SetLayerTreeHost() if a layer moves between trees.
(...skipping 28 matching lines...) Expand all
657 // These all act like draw properties, so don't need push properties. 658 // These all act like draw properties, so don't need push properties.
658 gfx::Rect visible_layer_rect_; 659 gfx::Rect visible_layer_rect_;
659 size_t num_unclipped_descendants_; 660 size_t num_unclipped_descendants_;
660 661
661 DISALLOW_COPY_AND_ASSIGN(Layer); 662 DISALLOW_COPY_AND_ASSIGN(Layer);
662 }; 663 };
663 664
664 } // namespace cc 665 } // namespace cc
665 666
666 #endif // CC_LAYERS_LAYER_H_ 667 #endif // CC_LAYERS_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698