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

Side by Side 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: cleaned up and rebased 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYER_IMPL_H_ 5 #ifndef CC_LAYER_IMPL_H_
6 #define CC_LAYER_IMPL_H_ 6 #define CC_LAYER_IMPL_H_
7 7
8 #include <public/WebFilterOperations.h> 8 #include <public/WebFilterOperations.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // willDraw must be called before appendQuads. If willDraw is called, 88 // willDraw must be called before appendQuads. If willDraw is called,
89 // didDraw is guaranteed to be called before another willDraw or before 89 // didDraw is guaranteed to be called before another willDraw or before
90 // the layer is destroyed. To enforce this, any class that overrides 90 // the layer is destroyed. To enforce this, any class that overrides
91 // willDraw/didDraw must call the base class version. 91 // willDraw/didDraw must call the base class version.
92 virtual void willDraw(ResourceProvider*); 92 virtual void willDraw(ResourceProvider*);
93 virtual void appendQuads(QuadSink&, AppendQuadsData&) { } 93 virtual void appendQuads(QuadSink&, AppendQuadsData&) { }
94 virtual void didDraw(ResourceProvider*); 94 virtual void didDraw(ResourceProvider*);
95 95
96 virtual ResourceProvider::ResourceId contentsResourceId() const; 96 virtual ResourceProvider::ResourceId contentsResourceId() const;
97 97
98 virtual bool hasDelegatedContent() const;
98 virtual bool hasContributingDelegatedRenderPasses() const; 99 virtual bool hasContributingDelegatedRenderPasses() const;
99 virtual RenderPass::Id firstContributingRenderPassId() const; 100 virtual RenderPass::Id firstContributingRenderPassId() const;
100 virtual RenderPass::Id nextContributingRenderPassId(RenderPass::Id) const; 101 virtual RenderPass::Id nextContributingRenderPassId(RenderPass::Id) const;
101 102
102 // Returns true if this layer has content to draw. 103 // Returns true if this layer has content to draw.
103 void setDrawsContent(bool); 104 void setDrawsContent(bool);
104 bool drawsContent() const { return m_drawsContent; } 105 bool drawsContent() const { return m_drawsContent; }
105 106
106 bool forceRenderSurface() const { return m_forceRenderSurface; } 107 bool forceRenderSurface() const { return m_forceRenderSurface; }
107 void setForceRenderSurface(bool force) { m_forceRenderSurface = force; } 108 void setForceRenderSurface(bool force) { m_forceRenderSurface = force; }
108 109
109 // Returns 0 if none of the layer's descendants has content to draw,
110 // 1 if exactly one descendant has content to draw, or a number >1
111 // (but necessary the exact number of descendants) otherwise.
112 virtual int descendantsDrawContent();
113
114 void setAnchorPoint(const gfx::PointF&); 110 void setAnchorPoint(const gfx::PointF&);
115 const gfx::PointF& anchorPoint() const { return m_anchorPoint; } 111 const gfx::PointF& anchorPoint() const { return m_anchorPoint; }
116 112
117 void setAnchorPointZ(float); 113 void setAnchorPointZ(float);
118 float anchorPointZ() const { return m_anchorPointZ; } 114 float anchorPointZ() const { return m_anchorPointZ; }
119 115
120 void setBackgroundColor(SkColor); 116 void setBackgroundColor(SkColor);
121 SkColor backgroundColor() const { return m_backgroundColor; } 117 SkColor backgroundColor() const { return m_backgroundColor; }
122 118
123 void setFilters(const WebKit::WebFilterOperations&); 119 void setFilters(const WebKit::WebFilterOperations&);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // Group of properties that need to be computed based on the layer tree 401 // Group of properties that need to be computed based on the layer tree
406 // hierarchy before layers can be drawn. 402 // hierarchy before layers can be drawn.
407 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; 403 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties;
408 404
409 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 405 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
410 }; 406 };
411 407
412 } 408 }
413 409
414 #endif // CC_LAYER_IMPL_H_ 410 #endif // CC_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layer.cc ('k') | cc/layer_impl.cc » ('j') | cc/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698