| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 void setReplicaLayer(scoped_ptr<LayerImpl>); | 72 void setReplicaLayer(scoped_ptr<LayerImpl>); |
| 73 LayerImpl* replicaLayer() { return m_replicaLayer.get(); } | 73 LayerImpl* replicaLayer() { return m_replicaLayer.get(); } |
| 74 const LayerImpl* replicaLayer() const { return m_replicaLayer.get(); } | 74 const LayerImpl* replicaLayer() const { return m_replicaLayer.get(); } |
| 75 | 75 |
| 76 bool hasMask() const { return m_maskLayer; } | 76 bool hasMask() const { return m_maskLayer; } |
| 77 bool hasReplica() const { return m_replicaLayer; } | 77 bool hasReplica() const { return m_replicaLayer; } |
| 78 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } | 78 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } |
| 79 | 79 |
| 80 LayerTreeHostImpl* layerTreeHostImpl() const { return m_layerTreeHostImpl; } | 80 LayerTreeHostImpl* layerTreeHostImpl() const { return m_layerTreeHostImpl; } |
| 81 void setLayerTreeHostImpl(LayerTreeHostImpl* hostImpl) { m_layerTreeHostImpl
= hostImpl; } | 81 void setLayerTreeHostImpl(LayerTreeHostImpl* hostImpl); |
| 82 | 82 |
| 83 scoped_ptr<SharedQuadState> createSharedQuadState() const; | 83 scoped_ptr<SharedQuadState> createSharedQuadState() const; |
| 84 // willDraw must be called before appendQuads. If willDraw is called, | 84 // willDraw must be called before appendQuads. If willDraw is called, |
| 85 // didDraw is guaranteed to be called before another willDraw or before | 85 // didDraw is guaranteed to be called before another willDraw or before |
| 86 // the layer is destroyed. To enforce this, any class that overrides | 86 // the layer is destroyed. To enforce this, any class that overrides |
| 87 // willDraw/didDraw must call the base class version. | 87 // willDraw/didDraw must call the base class version. |
| 88 virtual void willDraw(ResourceProvider*); | 88 virtual void willDraw(ResourceProvider*); |
| 89 virtual void appendQuads(QuadSink&, AppendQuadsData&) { } | 89 virtual void appendQuads(QuadSink&, AppendQuadsData&) { } |
| 90 virtual void didDraw(ResourceProvider*); | 90 virtual void didDraw(ResourceProvider*); |
| 91 | 91 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; | 288 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; |
| 289 | 289 |
| 290 virtual void dumpLayerProperties(std::string*, int indent) const; | 290 virtual void dumpLayerProperties(std::string*, int indent) const; |
| 291 static std::string indentString(int indent); | 291 static std::string indentString(int indent); |
| 292 | 292 |
| 293 private: | 293 private: |
| 294 void setParent(LayerImpl* parent) { m_parent = parent; } | 294 void setParent(LayerImpl* parent) { m_parent = parent; } |
| 295 friend class TreeSynchronizer; | 295 friend class TreeSynchronizer; |
| 296 void clearChildList(); // Warning: This does not preserve tree structure inv
ariants and so is only exposed to the tree synchronizer. | 296 void clearChildList(); // Warning: This does not preserve tree structure inv
ariants and so is only exposed to the tree synchronizer. |
| 297 | 297 |
| 298 void noteLayerSurfacePropertyChanged(); |
| 299 void noteLayerPropertyChanged(); |
| 298 void noteLayerPropertyChangedForSubtree(); | 300 void noteLayerPropertyChangedForSubtree(); |
| 299 | 301 |
| 300 // Note carefully this does not affect the current layer. | 302 // Note carefully this does not affect the current layer. |
| 301 void noteLayerPropertyChangedForDescendants(); | 303 void noteLayerPropertyChangedForDescendants(); |
| 302 | 304 |
| 303 virtual const char* layerTypeAsString() const; | 305 virtual const char* layerTypeAsString() const; |
| 304 | 306 |
| 305 void dumpLayer(std::string*, int indent) const; | 307 void dumpLayer(std::string*, int indent) const; |
| 306 | 308 |
| 307 // Properties internal to LayerImpl | 309 // Properties internal to LayerImpl |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 399 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
| 398 | 400 |
| 399 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 401 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 400 }; | 402 }; |
| 401 | 403 |
| 402 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); | 404 void sortLayers(std::vector<LayerImpl*>::iterator first, std::vector<LayerImpl*>
::iterator end, LayerSorter*); |
| 403 | 405 |
| 404 } | 406 } |
| 405 | 407 |
| 406 #endif // CC_LAYER_IMPL_H_ | 408 #endif // CC_LAYER_IMPL_H_ |
| OLD | NEW |