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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Add more tests to surface_aggregator. Created 3 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void SetTouchActionRegion(TouchActionRegion touch_action_region); 261 void SetTouchActionRegion(TouchActionRegion touch_action_region);
262 const TouchActionRegion& touch_action_region() const { 262 const TouchActionRegion& touch_action_region() const {
263 return inputs_.touch_action_region; 263 return inputs_.touch_action_region;
264 } 264 }
265 265
266 void set_did_scroll_callback( 266 void set_did_scroll_callback(
267 base::Callback<void(const gfx::ScrollOffset&)> callback) { 267 base::Callback<void(const gfx::ScrollOffset&)> callback) {
268 inputs_.did_scroll_callback = std::move(callback); 268 inputs_.did_scroll_callback = std::move(callback);
269 } 269 }
270 270
271 void SetCacheRenderSurface(bool cache_render_surface);
272 bool cache_render_surface() const { return cache_render_surface_; }
273
271 void SetForceRenderSurfaceForTesting(bool force_render_surface); 274 void SetForceRenderSurfaceForTesting(bool force_render_surface);
272 bool force_render_surface_for_testing() const { 275 bool force_render_surface_for_testing() const {
273 return force_render_surface_for_testing_; 276 return force_render_surface_for_testing_;
274 } 277 }
275 278
276 gfx::ScrollOffset CurrentScrollOffset() const { 279 gfx::ScrollOffset CurrentScrollOffset() const {
277 return inputs_.scroll_offset; 280 return inputs_.scroll_offset;
278 } 281 }
279 282
280 void SetDoubleSided(bool double_sided); 283 void SetDoubleSided(bool double_sided);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 int num_descendants_that_draw_content_; 634 int num_descendants_that_draw_content_;
632 int transform_tree_index_; 635 int transform_tree_index_;
633 int effect_tree_index_; 636 int effect_tree_index_;
634 int clip_tree_index_; 637 int clip_tree_index_;
635 int scroll_tree_index_; 638 int scroll_tree_index_;
636 int property_tree_sequence_number_; 639 int property_tree_sequence_number_;
637 gfx::Vector2dF offset_to_transform_parent_; 640 gfx::Vector2dF offset_to_transform_parent_;
638 bool should_flatten_transform_from_property_tree_ : 1; 641 bool should_flatten_transform_from_property_tree_ : 1;
639 bool draws_content_ : 1; 642 bool draws_content_ : 1;
640 bool should_check_backface_visibility_ : 1; 643 bool should_check_backface_visibility_ : 1;
644 // Force use of and cache render surface.
645 bool cache_render_surface_ : 1;
641 bool force_render_surface_for_testing_ : 1; 646 bool force_render_surface_for_testing_ : 1;
642 bool subtree_property_changed_ : 1; 647 bool subtree_property_changed_ : 1;
643 bool may_contain_video_ : 1; 648 bool may_contain_video_ : 1;
644 bool needs_show_scrollbars_ : 1; 649 bool needs_show_scrollbars_ : 1;
645 // Whether the nodes referred to by *_tree_index_ 650 // Whether the nodes referred to by *_tree_index_
646 // "belong" to this layer. Only applicable if use_layer_lists is false. 651 // "belong" to this layer. Only applicable if use_layer_lists is false.
647 bool has_transform_node_ : 1; 652 bool has_transform_node_ : 1;
648 // This value is valid only when LayerTreeHost::has_copy_request() is true 653 // This value is valid only when LayerTreeHost::has_copy_request() is true
649 bool subtree_has_copy_request_ : 1; 654 bool subtree_has_copy_request_ : 1;
650 SkColor safe_opaque_background_color_; 655 SkColor safe_opaque_background_color_;
651 std::unique_ptr<std::set<Layer*>> scroll_children_; 656 std::unique_ptr<std::set<Layer*>> scroll_children_;
652 657
653 std::unique_ptr<std::set<Layer*>> clip_children_; 658 std::unique_ptr<std::set<Layer*>> clip_children_;
654 659
655 // These all act like draw properties, so don't need push properties. 660 // These all act like draw properties, so don't need push properties.
656 gfx::Rect visible_layer_rect_; 661 gfx::Rect visible_layer_rect_;
657 size_t num_unclipped_descendants_; 662 size_t num_unclipped_descendants_;
658 663
659 DISALLOW_COPY_AND_ASSIGN(Layer); 664 DISALLOW_COPY_AND_ASSIGN(Layer);
660 }; 665 };
661 666
662 } // namespace cc 667 } // namespace cc
663 668
664 #endif // CC_LAYERS_LAYER_H_ 669 #endif // CC_LAYERS_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698