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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 void setSublayerTransform(const gfx::Transform&); | 157 void setSublayerTransform(const gfx::Transform&); |
158 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform
; } | 158 const gfx::Transform& sublayerTransform() const { return m_sublayerTransform
; } |
159 | 159 |
160 // Debug layer name. | 160 // Debug layer name. |
161 void setDebugName(const std::string& debugName) { m_debugName = debugName; } | 161 void setDebugName(const std::string& debugName) { m_debugName = debugName; } |
162 std::string debugName() const { return m_debugName; } | 162 std::string debugName() const { return m_debugName; } |
163 | 163 |
164 bool showDebugBorders() const; | 164 bool showDebugBorders() const; |
165 | 165 |
| 166 // These invalidate the host's render surface layer list. The caller |
| 167 // is responsible for calling setNeedsUpdateDrawProperties on the host |
| 168 // so that its list can be recreated. |
166 void createRenderSurface(); | 169 void createRenderSurface(); |
167 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } | 170 void clearRenderSurface() { m_drawProperties.render_surface.reset(); } |
168 | 171 |
169 DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() { return m_dr
awProperties; } | 172 DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() { return m_dr
awProperties; } |
170 const DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() const {
return m_drawProperties; } | 173 const DrawProperties<LayerImpl, RenderSurfaceImpl>& drawProperties() const {
return m_drawProperties; } |
171 | 174 |
172 // The following are shortcut accessors to get various information from m_dr
awProperties | 175 // The following are shortcut accessors to get various information from m_dr
awProperties |
173 const gfx::Transform& drawTransform() const { return m_drawProperties.target
_space_transform; } | 176 const gfx::Transform& drawTransform() const { return m_drawProperties.target
_space_transform; } |
174 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties
.screen_space_transform; } | 177 const gfx::Transform& screenSpaceTransform() const { return m_drawProperties
.screen_space_transform; } |
175 float drawOpacity() const { return m_drawProperties.opacity; } | 178 float drawOpacity() const { return m_drawProperties.opacity; } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; | 294 void appendDebugBorderQuad(QuadSink&, const SharedQuadState*, AppendQuadsDat
a&) const; |
292 | 295 |
293 virtual void dumpLayerProperties(std::string*, int indent) const; | 296 virtual void dumpLayerProperties(std::string*, int indent) const; |
294 static std::string indentString(int indent); | 297 static std::string indentString(int indent); |
295 | 298 |
296 private: | 299 private: |
297 void setParent(LayerImpl* parent) { m_parent = parent; } | 300 void setParent(LayerImpl* parent) { m_parent = parent; } |
298 friend class TreeSynchronizer; | 301 friend class TreeSynchronizer; |
299 void clearChildList(); // Warning: This does not preserve tree structure inv
ariants and so is only exposed to the tree synchronizer. | 302 void clearChildList(); // Warning: This does not preserve tree structure inv
ariants and so is only exposed to the tree synchronizer. |
300 | 303 |
| 304 void noteLayerSurfacePropertyChanged(); |
| 305 void noteLayerPropertyChanged(); |
301 void noteLayerPropertyChangedForSubtree(); | 306 void noteLayerPropertyChangedForSubtree(); |
302 | 307 |
303 // Note carefully this does not affect the current layer. | 308 // Note carefully this does not affect the current layer. |
304 void noteLayerPropertyChangedForDescendants(); | 309 void noteLayerPropertyChangedForDescendants(); |
305 | 310 |
306 virtual const char* layerTypeAsString() const; | 311 virtual const char* layerTypeAsString() const; |
307 | 312 |
308 void dumpLayer(std::string*, int indent) const; | 313 void dumpLayer(std::string*, int indent) const; |
309 | 314 |
310 // Properties internal to LayerImpl | 315 // Properties internal to LayerImpl |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // Group of properties that need to be computed based on the layer tree | 403 // Group of properties that need to be computed based on the layer tree |
399 // hierarchy before layers can be drawn. | 404 // hierarchy before layers can be drawn. |
400 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; | 405 DrawProperties<LayerImpl, RenderSurfaceImpl> m_drawProperties; |
401 | 406 |
402 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 407 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
403 }; | 408 }; |
404 | 409 |
405 } | 410 } |
406 | 411 |
407 #endif // CC_LAYER_IMPL_H_ | 412 #endif // CC_LAYER_IMPL_H_ |
OLD | NEW |