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 <public/WebFilterOperations.h> | 8 #include <public/WebFilterOperations.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 bool hasMask() const { return !!m_maskLayer; } | 209 bool hasMask() const { return !!m_maskLayer; } |
210 bool hasReplica() const { return !!m_replicaLayer; } | 210 bool hasReplica() const { return !!m_replicaLayer; } |
211 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); } |
212 | 212 |
213 // These methods typically need to be overwritten by derived classes. | 213 // These methods typically need to be overwritten by derived classes. |
214 virtual bool drawsContent() const; | 214 virtual bool drawsContent() const; |
215 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) { } | 215 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) { } |
216 virtual bool needMoreUpdates(); | 216 virtual bool needMoreUpdates(); |
217 virtual void setIsMask(bool) { } | 217 virtual void setIsMask(bool) { } |
218 virtual void bindContentsTexture() { } | |
219 | 218 |
220 void setDebugName(const std::string&); | 219 void setDebugName(const std::string&); |
221 | 220 |
222 virtual void pushPropertiesTo(LayerImpl*); | 221 virtual void pushPropertiesTo(LayerImpl*); |
223 | 222 |
224 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } | 223 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } |
225 void createRenderSurface(); | 224 void createRenderSurface(); |
226 | 225 |
227 // The contentsScale converts from logical, non-page-scaled pixels to target
pixels. | 226 // The contentsScale converts from logical, non-page-scaled pixels to target
pixels. |
228 // The contentsScale is 1 for the root layer as it is already in physical pi
xels. | 227 // The contentsScale is 1 for the root layer as it is already in physical pi
xels. |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 WebKit::WebLayerScrollClient* m_layerScrollClient; | 390 WebKit::WebLayerScrollClient* m_layerScrollClient; |
392 | 391 |
393 DrawProperties<Layer, RenderSurface> m_drawProperties; | 392 DrawProperties<Layer, RenderSurface> m_drawProperties; |
394 }; | 393 }; |
395 | 394 |
396 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); | 395 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*); |
397 | 396 |
398 } // namespace cc | 397 } // namespace cc |
399 | 398 |
400 #endif // CC_LAYER_H_ | 399 #endif // CC_LAYER_H_ |
OLD | NEW |