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

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit
Patch Set: hide mask layer also Created 3 years, 7 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_TREES_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 size_t NumLayers() const; 345 size_t NumLayers() const;
346 346
347 bool in_update_property_trees() const { return in_update_property_trees_; } 347 bool in_update_property_trees() const { return in_update_property_trees_; }
348 bool PaintContent(const LayerList& update_layer_list, 348 bool PaintContent(const LayerList& update_layer_list,
349 bool* content_is_suitable_for_gpu); 349 bool* content_is_suitable_for_gpu);
350 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } 350 bool in_paint_layer_contents() const { return in_paint_layer_contents_; }
351 351
352 void SetHasCopyRequest(bool has_copy_request); 352 void SetHasCopyRequest(bool has_copy_request);
353 bool has_copy_request() const { return has_copy_request_; } 353 bool has_copy_request() const { return has_copy_request_; }
354 354
355 using SurfaceIdsList = std::vector<const SurfaceId*>;
356 void AddHiddenSurfaceLayerId(Layer* layer);
357 const SurfaceIdsList* HiddenSurfaceLayerIds() const;
358 void ClearHiddenSurfaceLayerIds();
359
355 void AddLayerShouldPushProperties(Layer* layer); 360 void AddLayerShouldPushProperties(Layer* layer);
356 void RemoveLayerShouldPushProperties(Layer* layer); 361 void RemoveLayerShouldPushProperties(Layer* layer);
357 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); 362 std::unordered_set<Layer*>& LayersThatShouldPushProperties();
358 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; 363 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const;
359 364
360 void SetPageScaleFromImplSide(float page_scale); 365 void SetPageScaleFromImplSide(float page_scale);
361 void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll); 366 void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll);
362 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } 367 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; }
363 368
364 void UpdateHudLayer(bool show_hud_info); 369 void UpdateHudLayer(bool show_hud_info);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 614 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
610 615
611 PropertyTrees property_trees_; 616 PropertyTrees property_trees_;
612 617
613 bool needs_full_tree_sync_ = true; 618 bool needs_full_tree_sync_ = true;
614 619
615 gfx::Vector2dF elastic_overscroll_; 620 gfx::Vector2dF elastic_overscroll_;
616 621
617 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; 622 scoped_refptr<HeadsUpDisplayLayer> hud_layer_;
618 623
624 SurfaceIdsList hidden_surface_layer_ids_;
625
619 // Set of layers that need to push properties. 626 // Set of layers that need to push properties.
620 std::unordered_set<Layer*> layers_that_should_push_properties_; 627 std::unordered_set<Layer*> layers_that_should_push_properties_;
621 628
622 // Layer id to Layer map. 629 // Layer id to Layer map.
623 std::unordered_map<int, Layer*> layer_id_map_; 630 std::unordered_map<int, Layer*> layer_id_map_;
624 631
625 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; 632 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_;
626 633
627 bool in_paint_layer_contents_ = false; 634 bool in_paint_layer_contents_ = false;
628 bool in_update_property_trees_ = false; 635 bool in_update_property_trees_ = false;
629 636
630 // This is true if atleast one layer in the layer tree has a copy request. We 637 // This is true if atleast one layer in the layer tree has a copy request. We
631 // use this bool to decide whether we need to compute subtree has copy request 638 // use this bool to decide whether we need to compute subtree has copy request
632 // for every layer during property tree building. 639 // for every layer during property tree building.
633 bool has_copy_request_ = false; 640 bool has_copy_request_ = false;
634 641
635 MutatorHost* mutator_host_; 642 MutatorHost* mutator_host_;
636 643
637 std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>> 644 std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>>
638 queued_image_decodes_; 645 queued_image_decodes_;
639 646
640 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 647 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
641 }; 648 };
642 649
643 } // namespace cc 650 } // namespace cc
644 651
645 #endif // CC_TREES_LAYER_TREE_HOST_H_ 652 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698