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

Unified Diff: cc/layers/layer.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
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/trees/draw_property_utils.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 58dde9c4577aa05aca94dd2f73aab70af8e0f7d7..c215be42cf1b0c3d673dc965547ad7356a736145 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -97,6 +97,9 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
void RequestCopyOfOutput(std::unique_ptr<CopyOutputRequest> request);
bool HasCopyRequest() const { return !inputs_.copy_requests.empty(); }
+ void SetSubtreeHasCopyRequest(bool subtree_has_copy_request);
+ bool SubtreeHasCopyRequest() const;
+
void TakeCopyRequests(
std::vector<std::unique_ptr<CopyOutputRequest>>* requests);
@@ -401,7 +404,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
void SetMayContainVideo(bool yes);
- int num_copy_requests_in_target_subtree();
+ bool has_copy_requests_in_target_subtree();
void SetElementId(ElementId id);
ElementId element_id() const { return inputs_.element_id; }
@@ -627,6 +630,8 @@ class CC_EXPORT Layer : public base::RefCounted<Layer> {
bool may_contain_video_ : 1;
bool is_scroll_clip_layer_ : 1;
bool needs_show_scrollbars_ : 1;
+ // This value is valid only when LayerTreeHost::has_copy_request() is true
+ bool subtree_has_copy_request_ : 1;
SkColor safe_opaque_background_color_;
std::unique_ptr<std::set<Layer*>> scroll_children_;
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/trees/draw_property_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698