OLD | NEW |
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 void setReplicaLayer(scoped_ptr<LayerImpl>); | 76 void setReplicaLayer(scoped_ptr<LayerImpl>); |
77 LayerImpl* replicaLayer() { return m_replicaLayer.get(); } | 77 LayerImpl* replicaLayer() { return m_replicaLayer.get(); } |
78 const LayerImpl* replicaLayer() const { return m_replicaLayer.get(); } | 78 const LayerImpl* replicaLayer() const { return m_replicaLayer.get(); } |
79 | 79 |
80 bool hasMask() const { return m_maskLayer; } | 80 bool hasMask() const { return m_maskLayer; } |
81 bool hasReplica() const { return m_replicaLayer; } | 81 bool hasReplica() const { return m_replicaLayer; } |
82 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } | 82 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } |
83 | 83 |
84 LayerTreeImpl* layerTreeImpl() const { return m_layerTreeImpl; } | 84 LayerTreeImpl* layerTreeImpl() const { return m_layerTreeImpl; } |
85 LayerTreeHostImpl* layerTreeHostImpl() const; | |
86 | 85 |
87 scoped_ptr<SharedQuadState> createSharedQuadState() const; | 86 scoped_ptr<SharedQuadState> createSharedQuadState() const; |
88 // willDraw must be called before appendQuads. If willDraw is called, | 87 // willDraw must be called before appendQuads. If willDraw is called, |
89 // didDraw is guaranteed to be called before another willDraw or before | 88 // didDraw is guaranteed to be called before another willDraw or before |
90 // the layer is destroyed. To enforce this, any class that overrides | 89 // the layer is destroyed. To enforce this, any class that overrides |
91 // willDraw/didDraw must call the base class version. | 90 // willDraw/didDraw must call the base class version. |
92 virtual void willDraw(ResourceProvider*); | 91 virtual void willDraw(ResourceProvider*); |
93 virtual void appendQuads(QuadSink&, AppendQuadsData&) { } | 92 virtual void appendQuads(QuadSink&, AppendQuadsData&) { } |
94 virtual void didDraw(ResourceProvider*); | 93 virtual void didDraw(ResourceProvider*); |
95 | 94 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // Group of properties that need to be computed based on the layer tree | 404 // Group of properties that need to be computed based on the layer tree |
406 // hierarchy before layers can be drawn. | 405 // hierarchy before layers can be drawn. |
407 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 406 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
408 | 407 |
409 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 408 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
410 }; | 409 }; |
411 | 410 |
412 } | 411 } |
413 | 412 |
414 #endif // CC_LAYER_IMPL_H_ | 413 #endif // CC_LAYER_IMPL_H_ |
OLD | NEW |