| 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 CCLayerImpl_h | 5 #ifndef CCLayerImpl_h |
| 6 #define CCLayerImpl_h | 6 #define CCLayerImpl_h |
| 7 | 7 |
| 8 #include "CCInputHandler.h" | 8 #include "CCInputHandler.h" |
| 9 #include "CCLayerAnimationController.h" | 9 #include "CCLayerAnimationController.h" |
| 10 #include "CCRenderPass.h" | 10 #include "CCRenderPass.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void setReplicaLayer(PassOwnPtr<CCLayerImpl>); | 64 void setReplicaLayer(PassOwnPtr<CCLayerImpl>); |
| 65 CCLayerImpl* replicaLayer() const { return m_replicaLayer.get(); } | 65 CCLayerImpl* replicaLayer() const { return m_replicaLayer.get(); } |
| 66 | 66 |
| 67 bool hasMask() const { return m_maskLayer; } | 67 bool hasMask() const { return m_maskLayer; } |
| 68 bool hasReplica() const { return m_replicaLayer; } | 68 bool hasReplica() const { return m_replicaLayer; } |
| 69 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } | 69 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } |
| 70 | 70 |
| 71 CCLayerTreeHostImpl* layerTreeHostImpl() const { return m_layerTreeHostImpl;
} | 71 CCLayerTreeHostImpl* layerTreeHostImpl() const { return m_layerTreeHostImpl;
} |
| 72 void setLayerTreeHostImpl(CCLayerTreeHostImpl* hostImpl) { m_layerTreeHostIm
pl = hostImpl; } | 72 void setLayerTreeHostImpl(CCLayerTreeHostImpl* hostImpl) { m_layerTreeHostIm
pl = hostImpl; } |
| 73 | 73 |
| 74 PassOwnPtr<CCSharedQuadState> createSharedQuadState() const; | 74 scoped_ptr<CCSharedQuadState> createSharedQuadState() const; |
| 75 // willDraw must be called before appendQuads. If willDraw is called, | 75 // willDraw must be called before appendQuads. If willDraw is called, |
| 76 // didDraw is guaranteed to be called before another willDraw or before | 76 // didDraw is guaranteed to be called before another willDraw or before |
| 77 // the layer is destroyed. To enforce this, any class that overrides | 77 // the layer is destroyed. To enforce this, any class that overrides |
| 78 // willDraw/didDraw must call the base class version. | 78 // willDraw/didDraw must call the base class version. |
| 79 virtual void willDraw(CCResourceProvider*); | 79 virtual void willDraw(CCResourceProvider*); |
| 80 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) { } | 80 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) { } |
| 81 virtual void didDraw(CCResourceProvider*); | 81 virtual void didDraw(CCResourceProvider*); |
| 82 | 82 |
| 83 virtual CCResourceProvider::ResourceId contentsResourceId() const; | 83 virtual CCResourceProvider::ResourceId contentsResourceId() const; |
| 84 | 84 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 // Manages scrollbars for this layer | 391 // Manages scrollbars for this layer |
| 392 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; | 392 OwnPtr<CCScrollbarAnimationController> m_scrollbarAnimationController; |
| 393 }; | 393 }; |
| 394 | 394 |
| 395 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter
ator end, CCLayerSorter*); | 395 void sortLayers(Vector<CCLayerImpl*>::iterator first, Vector<CCLayerImpl*>::iter
ator end, CCLayerSorter*); |
| 396 | 396 |
| 397 } | 397 } |
| 398 | 398 |
| 399 #endif // CCLayerImpl_h | 399 #endif // CCLayerImpl_h |
| OLD | NEW |