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

Unified Diff: cc/layer_impl.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_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index a1dffea69f549bbdd673c81d5076b54092677f23..00ef261ca1919b96a4795889527583448ede2af5 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -59,6 +59,7 @@ LayerImpl::LayerImpl(int id)
#ifndef NDEBUG
, m_betweenWillDrawAndDidDraw(false)
#endif
+ , m_numDescendantsThatDrawContent(0)
, m_layerAnimationController(LayerAnimationController::create(this))
{
DCHECK(m_layerId > 0);
@@ -112,19 +113,6 @@ void LayerImpl::createRenderSurface()
setRenderTarget(this);
}
-int LayerImpl::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;
-}
-
scoped_ptr<SharedQuadState> LayerImpl::createSharedQuadState() const
{
scoped_ptr<SharedQuadState> state = SharedQuadState::Create();

Powered by Google App Engine
This is Rietveld 408576698