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

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

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Fix for comments in patch 4. Created 3 years, 6 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region); 253 void SetTouchEventHandlerRegion(const Region& touch_event_handler_region);
254 const Region& touch_event_handler_region() const { 254 const Region& touch_event_handler_region() const {
255 return inputs_.touch_event_handler_region; 255 return inputs_.touch_event_handler_region;
256 } 256 }
257 257
258 void set_did_scroll_callback( 258 void set_did_scroll_callback(
259 const base::Callback<void(const gfx::ScrollOffset&)>& callback) { 259 const base::Callback<void(const gfx::ScrollOffset&)>& callback) {
260 inputs_.did_scroll_callback = callback; 260 inputs_.did_scroll_callback = callback;
261 } 261 }
262 262
263 void SetCacheRenderSurface(bool cache_render_surface);
264 bool cache_render_surface() const { return cache_render_surface_; }
265
263 void SetForceRenderSurfaceForTesting(bool force_render_surface); 266 void SetForceRenderSurfaceForTesting(bool force_render_surface);
264 bool force_render_surface_for_testing() const { 267 bool force_render_surface_for_testing() const {
265 return force_render_surface_for_testing_; 268 return force_render_surface_for_testing_;
266 } 269 }
267 270
268 gfx::ScrollOffset CurrentScrollOffset() const { 271 gfx::ScrollOffset CurrentScrollOffset() const {
269 return inputs_.scroll_offset; 272 return inputs_.scroll_offset;
270 } 273 }
271 274
272 void SetDoubleSided(bool double_sided); 275 void SetDoubleSided(bool double_sided);
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 int transform_tree_index_; 627 int transform_tree_index_;
625 int effect_tree_index_; 628 int effect_tree_index_;
626 int clip_tree_index_; 629 int clip_tree_index_;
627 int scroll_tree_index_; 630 int scroll_tree_index_;
628 int property_tree_sequence_number_; 631 int property_tree_sequence_number_;
629 gfx::Vector2dF offset_to_transform_parent_; 632 gfx::Vector2dF offset_to_transform_parent_;
630 bool should_flatten_transform_from_property_tree_ : 1; 633 bool should_flatten_transform_from_property_tree_ : 1;
631 bool draws_content_ : 1; 634 bool draws_content_ : 1;
632 bool use_local_transform_for_backface_visibility_ : 1; 635 bool use_local_transform_for_backface_visibility_ : 1;
633 bool should_check_backface_visibility_ : 1; 636 bool should_check_backface_visibility_ : 1;
637 // Force use of and cache render surface.
638 bool cache_render_surface_ : 1;
634 bool force_render_surface_for_testing_ : 1; 639 bool force_render_surface_for_testing_ : 1;
635 bool subtree_property_changed_ : 1; 640 bool subtree_property_changed_ : 1;
636 bool may_contain_video_ : 1; 641 bool may_contain_video_ : 1;
637 bool is_scroll_clip_layer_ : 1; 642 bool is_scroll_clip_layer_ : 1;
638 bool needs_show_scrollbars_ : 1; 643 bool needs_show_scrollbars_ : 1;
639 // This value is valid only when LayerTreeHost::has_copy_request() is true 644 // This value is valid only when LayerTreeHost::has_copy_request() is true
640 bool subtree_has_copy_request_ : 1; 645 bool subtree_has_copy_request_ : 1;
641 SkColor safe_opaque_background_color_; 646 SkColor safe_opaque_background_color_;
642 std::unique_ptr<std::set<Layer*>> scroll_children_; 647 std::unique_ptr<std::set<Layer*>> scroll_children_;
643 648
644 std::unique_ptr<std::set<Layer*>> clip_children_; 649 std::unique_ptr<std::set<Layer*>> clip_children_;
645 650
646 // These all act like draw properties, so don't need push properties. 651 // These all act like draw properties, so don't need push properties.
647 gfx::Rect visible_layer_rect_; 652 gfx::Rect visible_layer_rect_;
648 size_t num_unclipped_descendants_; 653 size_t num_unclipped_descendants_;
649 654
650 DISALLOW_COPY_AND_ASSIGN(Layer); 655 DISALLOW_COPY_AND_ASSIGN(Layer);
651 }; 656 };
652 657
653 } // namespace cc 658 } // namespace cc
654 659
655 #endif // CC_LAYERS_LAYER_H_ 660 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « cc/ipc/struct_traits_unittest.cc ('k') | cc/layers/layer.cc » ('j') | cc/trees/damage_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698