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

Unified Diff: cc/trees/layer_tree_host.h

Issue 2822303003: cc : Compute subtree has copy requests before property tree building (Closed)
Patch Set: . Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index bf5520e2a39bc5787ced71b5832aaaf1b1e681d3..9ecdc776eadcaeaf1c5468fb355856a6d9fed88d 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -341,6 +341,9 @@ class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(SurfaceReferenceOwner),
bool* content_is_suitable_for_gpu);
bool in_paint_layer_contents() const { return in_paint_layer_contents_; }
+ void SetHasCopyRequest(bool has_copy_request);
+ bool has_copy_request() const { return has_copy_request_; }
+
void AddLayerShouldPushProperties(Layer* layer);
void RemoveLayerShouldPushProperties(Layer* layer);
std::unordered_set<Layer*>& LayersThatShouldPushProperties();
@@ -611,6 +614,11 @@ class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(SurfaceReferenceOwner),
bool in_paint_layer_contents_ = false;
bool in_update_property_trees_ = false;
+ // This is true if atleast one layer in the layer tree has a copy request. We
+ // use this bool to decide whether we need to compute subtree has copy request
+ // for every layer during property tree building.
+ bool has_copy_request_ = false;
+
MutatorHost* mutator_host_;
std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>>

Powered by Google App Engine
This is Rietveld 408576698