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

Unified Diff: cc/layer_impl.h

Issue 11316171: Don't create render passes for transparent images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 1 month 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/layer.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.h
diff --git a/cc/layer_impl.h b/cc/layer_impl.h
index 6cc4d1230b349846c3fb0495fe19e317372a1aa4..3e72d20a70220a488d3b675637e3892bbd49d503 100644
--- a/cc/layer_impl.h
+++ b/cc/layer_impl.h
@@ -38,6 +38,8 @@ struct AppendQuadsData;
class CC_EXPORT LayerImpl : public LayerAnimationControllerClient {
public:
+ typedef ScopedPtrVector<LayerImpl> LayerList;
+
static scoped_ptr<LayerImpl> create(int id)
{
return make_scoped_ptr(new LayerImpl(id));
@@ -55,7 +57,7 @@ public:
// Tree structure.
LayerImpl* parent() { return m_parent; }
const LayerImpl* parent() const { return m_parent; }
- const ScopedPtrVector<LayerImpl>& children() const { return m_children; }
+ const LayerList& children() const { return m_children; }
void addChild(scoped_ptr<LayerImpl>);
void removeFromParent();
void removeAllChildren();
@@ -97,8 +99,10 @@ public:
bool forceRenderSurface() const { return m_forceRenderSurface; }
void setForceRenderSurface(bool force) { m_forceRenderSurface = force; }
- // Returns true if any of the layer's descendants has content to draw.
- virtual bool descendantDrawsContent();
+ // 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();
void setAnchorPoint(const gfx::PointF&);
const gfx::PointF& anchorPoint() const { return m_anchorPoint; }
@@ -314,7 +318,7 @@ private:
// Properties internal to LayerImpl
LayerImpl* m_parent;
- ScopedPtrVector<LayerImpl> m_children;
+ LayerList m_children;
// m_maskLayer can be temporarily stolen during tree sync, we need this ID to confirm newly assigned layer is still the previous one
int m_maskLayerId;
scoped_ptr<LayerImpl> m_maskLayer;
« no previous file with comments | « cc/layer.cc ('k') | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698