| 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_LAYERS_RENDER_SURFACE_IMPL_H_ | 5 #ifndef CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| 6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 6 #define CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 namespace cc { | 25 namespace cc { |
| 26 | 26 |
| 27 class DamageTracker; | 27 class DamageTracker; |
| 28 class FilterOperations; | 28 class FilterOperations; |
| 29 class Occlusion; | 29 class Occlusion; |
| 30 class RenderPassId; | 30 class RenderPassId; |
| 31 class RenderPassSink; | 31 class RenderPassSink; |
| 32 class LayerImpl; | 32 class LayerImpl; |
| 33 class LayerIterator; | 33 class LayerIterator; |
| 34 class LayerTreeImpl; |
| 34 | 35 |
| 35 struct AppendQuadsData; | 36 struct AppendQuadsData; |
| 36 | 37 |
| 37 class CC_EXPORT RenderSurfaceImpl { | 38 class CC_EXPORT RenderSurfaceImpl { |
| 38 public: | 39 public: |
| 39 explicit RenderSurfaceImpl(LayerImpl* owning_layer); | 40 explicit RenderSurfaceImpl(LayerImpl* owning_layer); |
| 40 virtual ~RenderSurfaceImpl(); | 41 virtual ~RenderSurfaceImpl(); |
| 41 | 42 |
| 42 // Returns the RenderSurfaceImpl that this render surface contributes to. Root | 43 // Returns the RenderSurfaceImpl that this render surface contributes to. Root |
| 43 // render surface's render_target is itself. | 44 // render surface's render_target is itself. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 const Occlusion& occlusion_in_content_space() const { | 118 const Occlusion& occlusion_in_content_space() const { |
| 118 return occlusion_in_content_space_; | 119 return occlusion_in_content_space_; |
| 119 } | 120 } |
| 120 void set_occlusion_in_content_space(const Occlusion& occlusion) { | 121 void set_occlusion_in_content_space(const Occlusion& occlusion) { |
| 121 occlusion_in_content_space_ = occlusion; | 122 occlusion_in_content_space_ = occlusion; |
| 122 } | 123 } |
| 123 | 124 |
| 124 LayerImplList& layer_list() { return layer_list_; } | 125 LayerImplList& layer_list() { return layer_list_; } |
| 125 void ClearLayerLists(); | 126 void ClearLayerLists(); |
| 126 | 127 |
| 127 int OwningLayerId() const; | 128 int id() const { return stable_effect_id_; } |
| 128 | 129 |
| 129 LayerImpl* MaskLayer(); | 130 LayerImpl* MaskLayer(); |
| 130 bool HasMask() const; | 131 bool HasMask() const; |
| 131 | 132 |
| 132 const FilterOperations& Filters() const; | 133 const FilterOperations& Filters() const; |
| 133 const FilterOperations& BackgroundFilters() const; | 134 const FilterOperations& BackgroundFilters() const; |
| 134 gfx::PointF FiltersOrigin() const; | 135 gfx::PointF FiltersOrigin() const; |
| 135 gfx::Transform FiltersTransform() const; | 136 gfx::Transform FiltersTransform() const; |
| 136 | 137 |
| 137 bool HasCopyRequest() const; | 138 bool HasCopyRequest() const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 154 int EffectTreeIndex() const; | 155 int EffectTreeIndex() const; |
| 155 | 156 |
| 156 private: | 157 private: |
| 157 void SetContentRect(const gfx::Rect& content_rect); | 158 void SetContentRect(const gfx::Rect& content_rect); |
| 158 gfx::Rect CalculateClippedAccumulatedContentRect(); | 159 gfx::Rect CalculateClippedAccumulatedContentRect(); |
| 159 | 160 |
| 160 const EffectNode* OwningEffectNode() const; | 161 const EffectNode* OwningEffectNode() const; |
| 161 | 162 |
| 162 LayerImpl* owning_layer_; | 163 LayerImpl* owning_layer_; |
| 163 | 164 |
| 165 LayerTreeImpl* layer_tree_impl_; |
| 166 int stable_effect_id_; |
| 167 |
| 164 // Container for properties that render surfaces need to compute before they | 168 // Container for properties that render surfaces need to compute before they |
| 165 // can be drawn. | 169 // can be drawn. |
| 166 struct DrawProperties { | 170 struct DrawProperties { |
| 167 DrawProperties(); | 171 DrawProperties(); |
| 168 ~DrawProperties(); | 172 ~DrawProperties(); |
| 169 | 173 |
| 170 float draw_opacity; | 174 float draw_opacity; |
| 171 | 175 |
| 172 // Transforms from the surface's own space to the space of its target | 176 // Transforms from the surface's own space to the space of its target |
| 173 // surface. | 177 // surface. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 int target_render_surface_layer_index_history_; | 211 int target_render_surface_layer_index_history_; |
| 208 size_t current_layer_index_history_; | 212 size_t current_layer_index_history_; |
| 209 | 213 |
| 210 friend class LayerIterator; | 214 friend class LayerIterator; |
| 211 | 215 |
| 212 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 216 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
| 213 }; | 217 }; |
| 214 | 218 |
| 215 } // namespace cc | 219 } // namespace cc |
| 216 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 220 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| OLD | NEW |