| 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 23 matching lines...) Expand all Loading... |
| 161 int EffectTreeIndex() const; | 162 int EffectTreeIndex() const; |
| 162 | 163 |
| 163 private: | 164 private: |
| 164 void SetContentRect(const gfx::Rect& content_rect); | 165 void SetContentRect(const gfx::Rect& content_rect); |
| 165 gfx::Rect CalculateClippedAccumulatedContentRect(); | 166 gfx::Rect CalculateClippedAccumulatedContentRect(); |
| 166 | 167 |
| 167 const EffectNode* OwningEffectNode() const; | 168 const EffectNode* OwningEffectNode() const; |
| 168 | 169 |
| 169 LayerImpl* owning_layer_; | 170 LayerImpl* owning_layer_; |
| 170 | 171 |
| 172 LayerTreeImpl* layer_tree_impl_; |
| 173 int stable_effect_id_; |
| 174 |
| 171 // Container for properties that render surfaces need to compute before they | 175 // Container for properties that render surfaces need to compute before they |
| 172 // can be drawn. | 176 // can be drawn. |
| 173 struct DrawProperties { | 177 struct DrawProperties { |
| 174 DrawProperties(); | 178 DrawProperties(); |
| 175 ~DrawProperties(); | 179 ~DrawProperties(); |
| 176 | 180 |
| 177 float draw_opacity; | 181 float draw_opacity; |
| 178 | 182 |
| 179 // Transforms from the surface's own space to the space of its target | 183 // Transforms from the surface's own space to the space of its target |
| 180 // surface. | 184 // surface. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 int target_render_surface_layer_index_history_; | 218 int target_render_surface_layer_index_history_; |
| 215 size_t current_layer_index_history_; | 219 size_t current_layer_index_history_; |
| 216 | 220 |
| 217 friend class LayerIterator; | 221 friend class LayerIterator; |
| 218 | 222 |
| 219 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 223 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
| 220 }; | 224 }; |
| 221 | 225 |
| 222 } // namespace cc | 226 } // namespace cc |
| 223 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 227 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| OLD | NEW |