| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 void setSublayerTransform(const gfx::Transform&); | 149 void setSublayerTransform(const gfx::Transform&); |
| 150 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform
; } | 150 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform
; } |
| 151 | 151 |
| 152 // Debug layer name. | 152 // Debug layer name. |
| 153 void setDebugName(const std::string& debugName) { m_debugName = debugName; } | 153 void setDebugName(const std::string& debugName) { m_debugName = debugName; } |
| 154 std::string debugName() const { return m_debugName; } | 154 std::string debugName() const { return m_debugName; } |
| 155 | 155 |
| 156 bool showDebugBorders() const; | 156 bool showDebugBorders() const; |
| 157 | 157 |
| 158 // These invalidate the host's render surface layer list. The caller |
| 159 // is responsible for calling setNeedsUpdateDrawProperties on the host |
| 160 // so that its list can be recreated. |
| 158 void createRenderSurface(); | 161 void createRenderSurface(); |
| 159 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } | 162 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } |
| 160 | 163 |
| 161 DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() { return m_dr
awProperties; } | 164 DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() { return m_dr
awProperties; } |
| 162 const DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() const {
return m_drawProperties; } | 165 const DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() const {
return m_drawProperties; } |
| 163 | 166 |
| 164 // The following are shortcut accessors to get various information from m_dr
awProperties | 167 // The following are shortcut accessors to get various information from m_dr
awProperties |
| 165 const gfx::Transform& drawTransform() const { return m_drawProperties.target
_space_transform; } | 168 const gfx::Transform& drawTransform() const { return m_drawProperties.target
_space_transform; } |
| 166 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties
.screen_space_transform; } | 169 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties
.screen_space_transform; } |
| 167 float drawOpacity() const { return m_drawProperties.opacity; } | 170 float drawOpacity() const { return m_drawProperties.opacity; } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; | 286 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; |
| 284 | 287 |
| 285 virtual void dumpLayerProperties(std::string*, int indent) const; | 288 virtual void dumpLayerProperties(std::string*, int indent) const; |
| 286 static std::string indentString(int indent); | 289 static std::string indentString(int indent); |
| 287 | 290 |
| 288 private: | 291 private: |
| 289 void setParent(LayerImpl* parent) { m_parent = parent; } | 292 void setParent(LayerImpl* parent) { m_parent = parent; } |
| 290 friend class TreeSynchronizer; | 293 friend class TreeSynchronizer; |
| 291 void clearChildList(); // Warning: This does not preserve tree structure inv
ariants and so is only exposed to the tree synchronizer. | 294 void clearChildList(); // Warning: This does not preserve tree structure inv
ariants and so is only exposed to the tree synchronizer. |
| 292 | 295 |
| 296 void noteLayerSurfacePropertyChanged(); |
| 297 void noteLayerPropertyChanged(); |
| 293 void noteLayerPropertyChangedForSubtree(); | 298 void noteLayerPropertyChangedForSubtree(); |
| 294 | 299 |
| 295 // Note carefully this does not affect the current layer. | 300 // Note carefully this does not affect the current layer. |
| 296 void noteLayerPropertyChangedForDescendants(); | 301 void noteLayerPropertyChangedForDescendants(); |
| 297 | 302 |
| 298 virtual const char* layerTypeAsString() const; | 303 virtual const char* layerTypeAsString() const; |
| 299 | 304 |
| 300 void dumpLayer(std::string*, int indent) const; | 305 void dumpLayer(std::string*, int indent) const; |
| 301 | 306 |
| 302 // Properties internal to LayerImpl | 307 // Properties internal to LayerImpl |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // Group of properties that need to be computed based on the layer tree | 393 // Group of properties that need to be computed based on the layer tree |
| 389 // hierarchy before layers can be drawn. | 394 // hierarchy before layers can be drawn. |
| 390 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 395 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
| 391 | 396 |
| 392 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 397 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 393 }; | 398 }; |
| 394 | 399 |
| 395 } | 400 } |
| 396 | 401 |
| 397 #endif // CC_LAYER_IMPL_H_ | 402 #endif // CC_LAYER_IMPL_H_ |
| OLD | NEW |