Index: cc/layer.cc |
diff --git a/cc/layer.cc b/cc/layer.cc |
index c7b7ebc503b02e3e7190777985bf67d880a685e7..242ad765ed55ec51053e471195c8530c80ad0e2e 100644 |
--- a/cc/layer.cc |
+++ b/cc/layer.cc |
@@ -698,13 +698,17 @@ void Layer::createRenderSurface() |
setRenderTarget(this); |
} |
-bool Layer::descendantDrawsContent() |
+int Layer::descendantsDrawContent() |
{ |
+ int result = 0; |
for (size_t i = 0; i < m_children.size(); ++i) { |
- if (m_children[i]->drawsContent() || m_children[i]->descendantDrawsContent()) |
- return true; |
+ if (m_children[i]->drawsContent()) |
+ ++result; |
+ result += m_children[i]->descendantsDrawContent(); |
+ if (result > 1) |
+ return result; |
} |
- return false; |
+ return result; |
} |
int Layer::id() const |