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

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

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

Powered by Google App Engine
This is Rietveld 408576698