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

Unified Diff: cc/layer.cc

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.cc
diff --git a/cc/layer.cc b/cc/layer.cc
index 242ad765ed55ec51053e471195c8530c80ad0e2e..5ae5f2735799f3cde5892e61e4e452641658c547 100644
--- a/cc/layer.cc
+++ b/cc/layer.cc
@@ -64,6 +64,7 @@ Layer::Layer()
, m_rasterScale(1.0)
, m_automaticallyComputeRasterScale(false)
, m_boundsContainPageScale(false)
+ , m_numDescendantsThatDrawContent(0)
, m_layerAnimationDelegate(0)
, m_layerScrollClient(0)
{
@@ -698,19 +699,6 @@ void Layer::createRenderSurface()
setRenderTarget(this);
}
-int Layer::descendantsDrawContent()
-{
- int result = 0;
- for (size_t i = 0; i < m_children.size(); ++i) {
- if (m_children[i]->drawsContent())
- ++result;
- result += m_children[i]->descendantsDrawContent();
- if (result > 1)
- return result;
- }
- return result;
-}
-
int Layer::id() const
{
return m_layerId;

Powered by Google App Engine
This is Rietveld 408576698