| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYER_H_ |
| 6 #define CC_LAYER_H_ | 6 #define CC_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us
eParentBackfaceVisibility = useParentBackfaceVisibility; } | 194 void setUseParentBackfaceVisibility(bool useParentBackfaceVisibility) { m_us
eParentBackfaceVisibility = useParentBackfaceVisibility; } |
| 195 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil
ity; } | 195 bool useParentBackfaceVisibility() const { return m_useParentBackfaceVisibil
ity; } |
| 196 | 196 |
| 197 virtual void setLayerTreeHost(LayerTreeHost*); | 197 virtual void setLayerTreeHost(LayerTreeHost*); |
| 198 | 198 |
| 199 bool hasDelegatedContent() const { return false; } | 199 bool hasDelegatedContent() const { return false; } |
| 200 bool hasContributingDelegatedRenderPasses() const { return false; } | 200 bool hasContributingDelegatedRenderPasses() const { return false; } |
| 201 | 201 |
| 202 void setIsDrawable(bool); | 202 void setIsDrawable(bool); |
| 203 bool isDrawable() const { return m_isDrawable; } |
| 203 | 204 |
| 204 void setReplicaLayer(Layer*); | 205 void setReplicaLayer(Layer*); |
| 205 Layer* replicaLayer() { return m_replicaLayer.get(); } | 206 Layer* replicaLayer() { return m_replicaLayer.get(); } |
| 206 const Layer* replicaLayer() const { return m_replicaLayer.get(); } | 207 const Layer* replicaLayer() const { return m_replicaLayer.get(); } |
| 207 | 208 |
| 208 bool hasMask() const { return !!m_maskLayer; } | 209 bool hasMask() const { return !!m_maskLayer; } |
| 209 bool hasReplica() const { return !!m_replicaLayer; } | 210 bool hasReplica() const { return !!m_replicaLayer; } |
| 210 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } | 211 bool replicaHasMask() const { return m_replicaLayer && (m_maskLayer || m_rep
licaLayer->m_maskLayer); } |
| 211 | 212 |
| 212 // These methods typically need to be overwritten by derived classes. | 213 // These methods typically need to be overwritten by derived classes. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 | 278 |
| 278 void addLayerAnimationEventObserver(LayerAnimationEventObserver* animationOb
server); | 279 void addLayerAnimationEventObserver(LayerAnimationEventObserver* animationOb
server); |
| 279 void removeLayerAnimationEventObserver(LayerAnimationEventObserver* animatio
nObserver); | 280 void removeLayerAnimationEventObserver(LayerAnimationEventObserver* animatio
nObserver); |
| 280 | 281 |
| 281 virtual Region visibleContentOpaqueRegion() const; | 282 virtual Region visibleContentOpaqueRegion() const; |
| 282 | 283 |
| 283 virtual ScrollbarLayer* toScrollbarLayer(); | 284 virtual ScrollbarLayer* toScrollbarLayer(); |
| 284 | 285 |
| 285 gfx::Rect layerRectToContentRect(const gfx::RectF& layerRect) const; | 286 gfx::Rect layerRectToContentRect(const gfx::RectF& layerRect) const; |
| 286 | 287 |
| 288 virtual bool isPictureLayer() const; |
| 289 |
| 287 // In impl-side painting, this returns true if this layer type is not | 290 // In impl-side painting, this returns true if this layer type is not |
| 288 // compatible with the main thread running freely, such as a double-buffered | 291 // compatible with the main thread running freely, such as a double-buffered |
| 289 // canvas that doesn't want to be triple-buffered across all three trees. | 292 // canvas that doesn't want to be triple-buffered across all three trees. |
| 290 virtual bool blocksPendingCommit() const; | 293 virtual bool blocksPendingCommit() const; |
| 291 | 294 |
| 292 protected: | 295 protected: |
| 293 friend class LayerImpl; | 296 friend class LayerImpl; |
| 294 friend class TreeSynchronizer; | 297 friend class TreeSynchronizer; |
| 295 virtual ~Layer(); | 298 virtual ~Layer(); |
| 296 | 299 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 WebKit::WebLayerScrollClient* m_layerScrollClient; | 404 WebKit::WebLayerScrollClient* m_layerScrollClient; |
| 402 | 405 |
| 403 DrawProperties<Layer, RenderSurface> m_drawProperties; | 406 DrawProperties<Layer, RenderSurface> m_drawProperties; |
| 404 }; | 407 }; |
| 405 | 408 |
| 406 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 409 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
| 407 | 410 |
| 408 } // namespace cc | 411 } // namespace cc |
| 409 | 412 |
| 410 #endif // CC_LAYER_H_ | 413 #endif // CC_LAYER_H_ |
| OLD | NEW |