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

Unified Diff: cc/layers/layer_impl.h

Issue 373113003: Keeping track of descendants that draw content instead of recalcualting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index 979d2e02c8c0a96ce4ce13b2de5a5c38f20ba5c3..b9713e1e8d7c160cc6cb4672a720c4ca6270e552 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -139,6 +139,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
return scroll_children_.get();
}
+ void SetNumDescendantsThatDrawContent(int num_descendants);
void SetClipParent(LayerImpl* ancestor);
LayerImpl* clip_parent() {
@@ -210,6 +211,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
void SetDrawsContent(bool draws_content);
bool DrawsContent() const { return draws_content_; }
+ virtual int NumDescendantsThatDrawContent() const;
void SetHideLayerAndSubtree(bool hide);
bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
@@ -650,6 +652,8 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
gfx::Vector2d sent_scroll_delta_;
gfx::Vector2dF last_scroll_offset_;
+ int num_descendants_that_draw_content_;
+
// The global depth value of the center of the layer. This value is used
// to sort layers from back to front.
float draw_depth_;

Powered by Google App Engine
This is Rietveld 408576698