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

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, 4 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 | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.h
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index c1ce9df5c0198be46b4ee76cf2a2cda99ffd7367..b09cb3f4970792d56829a9899dcd48d048450527 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -140,6 +140,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
return scroll_children_.get();
}
+ void SetNumDescendantsThatDrawContent(int num_descendants);
void SetClipParent(LayerImpl* ancestor);
LayerImpl* clip_parent() {
@@ -211,6 +212,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
void SetDrawsContent(bool draws_content);
bool DrawsContent() const { return draws_content_; }
+ 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_;
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698