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

Unified Diff: cc/layer_impl.h

Issue 11419284: Move second internal recursion to a precomputation in layer_tree_host_common.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/layer_impl.h
diff --git a/cc/layer_impl.h b/cc/layer_impl.h
index 3e72d20a70220a488d3b675637e3892bbd49d503..ab7da46ba08952fef6c7a202bf23f3f02d6d7ec4 100644
--- a/cc/layer_impl.h
+++ b/cc/layer_impl.h
@@ -99,10 +99,9 @@ public:
bool forceRenderSurface() const { return m_forceRenderSurface; }
void setForceRenderSurface(bool force) { m_forceRenderSurface = force; }
- // Returns 0 if none of the layer's descendants has content to draw,
- // 1 if exactly one descendant has content to draw, or a number >1
- // (but necessary the exact number of descendants) otherwise.
- virtual int descendantsDrawContent();
+ // This value does not consider the layer itself, only its descendants.
+ virtual int numDescendantsThatDrawContent() { return m_numDescendantsThatDrawContent; }
danakj 2012/12/03 18:33:41 i like the function name
+ void setNumDescendantsThatDrawContent(int num) { m_numDescendantsThatDrawContent = num; }
danakj 2012/12/03 18:33:41 I kinda don't like this. Set/get seems simple but
void setAnchorPoint(const gfx::PointF&);
const gfx::PointF& anchorPoint() const { return m_anchorPoint; }
@@ -423,6 +422,8 @@ private:
// Uses layer's content space.
gfx::RectF m_updateRect;
+ bool m_numDescendantsThatDrawContent;
slavi 2012/12/03 21:33:42 That should be an int.
+
// Manages animations for this layer.
scoped_ptr<LayerAnimationController> m_layerAnimationController;

Powered by Google App Engine
This is Rietveld 408576698