| 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; | |
| 35 | 34 |
| 36 struct AppendQuadsData; | 35 struct AppendQuadsData; |
| 37 | 36 |
| 38 class CC_EXPORT RenderSurfaceImpl { | 37 class CC_EXPORT RenderSurfaceImpl { |
| 39 public: | 38 public: |
| 40 explicit RenderSurfaceImpl(LayerImpl* owning_layer); | 39 explicit RenderSurfaceImpl(LayerImpl* owning_layer); |
| 41 virtual ~RenderSurfaceImpl(); | 40 virtual ~RenderSurfaceImpl(); |
| 42 | 41 |
| 43 // Returns the RenderSurfaceImpl that this render surface contributes to. Root | 42 // Returns the RenderSurfaceImpl that this render surface contributes to. Root |
| 44 // render surface's render_target is itself. | 43 // render surface's render_target is itself. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 const Occlusion& occlusion_in_content_space() const { | 117 const Occlusion& occlusion_in_content_space() const { |
| 119 return occlusion_in_content_space_; | 118 return occlusion_in_content_space_; |
| 120 } | 119 } |
| 121 void set_occlusion_in_content_space(const Occlusion& occlusion) { | 120 void set_occlusion_in_content_space(const Occlusion& occlusion) { |
| 122 occlusion_in_content_space_ = occlusion; | 121 occlusion_in_content_space_ = occlusion; |
| 123 } | 122 } |
| 124 | 123 |
| 125 LayerImplList& layer_list() { return layer_list_; } | 124 LayerImplList& layer_list() { return layer_list_; } |
| 126 void ClearLayerLists(); | 125 void ClearLayerLists(); |
| 127 | 126 |
| 128 int id() const { return stable_effect_id_; } | 127 int OwningLayerId() const; |
| 129 | 128 |
| 130 LayerImpl* MaskLayer(); | 129 LayerImpl* MaskLayer(); |
| 131 bool HasMask() const; | 130 bool HasMask() const; |
| 132 | 131 |
| 133 const FilterOperations& Filters() const; | 132 const FilterOperations& Filters() const; |
| 134 const FilterOperations& BackgroundFilters() const; | 133 const FilterOperations& BackgroundFilters() const; |
| 135 gfx::PointF FiltersOrigin() const; | 134 gfx::PointF FiltersOrigin() const; |
| 136 gfx::Transform FiltersTransform() const; | 135 gfx::Transform FiltersTransform() const; |
| 137 | 136 |
| 138 bool HasCopyRequest() const; | 137 bool HasCopyRequest() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 162 int EffectTreeIndex() const; | 161 int EffectTreeIndex() const; |
| 163 | 162 |
| 164 private: | 163 private: |
| 165 void SetContentRect(const gfx::Rect& content_rect); | 164 void SetContentRect(const gfx::Rect& content_rect); |
| 166 gfx::Rect CalculateClippedAccumulatedContentRect(); | 165 gfx::Rect CalculateClippedAccumulatedContentRect(); |
| 167 | 166 |
| 168 const EffectNode* OwningEffectNode() const; | 167 const EffectNode* OwningEffectNode() const; |
| 169 | 168 |
| 170 LayerImpl* owning_layer_; | 169 LayerImpl* owning_layer_; |
| 171 | 170 |
| 172 LayerTreeImpl* layer_tree_impl_; | |
| 173 int stable_effect_id_; | |
| 174 | |
| 175 // Container for properties that render surfaces need to compute before they | 171 // Container for properties that render surfaces need to compute before they |
| 176 // can be drawn. | 172 // can be drawn. |
| 177 struct DrawProperties { | 173 struct DrawProperties { |
| 178 DrawProperties(); | 174 DrawProperties(); |
| 179 ~DrawProperties(); | 175 ~DrawProperties(); |
| 180 | 176 |
| 181 float draw_opacity; | 177 float draw_opacity; |
| 182 | 178 |
| 183 // Transforms from the surface's own space to the space of its target | 179 // Transforms from the surface's own space to the space of its target |
| 184 // surface. | 180 // surface. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 int target_render_surface_layer_index_history_; | 214 int target_render_surface_layer_index_history_; |
| 219 size_t current_layer_index_history_; | 215 size_t current_layer_index_history_; |
| 220 | 216 |
| 221 friend class LayerIterator; | 217 friend class LayerIterator; |
| 222 | 218 |
| 223 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); | 219 DISALLOW_COPY_AND_ASSIGN(RenderSurfaceImpl); |
| 224 }; | 220 }; |
| 225 | 221 |
| 226 } // namespace cc | 222 } // namespace cc |
| 227 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ | 223 #endif // CC_LAYERS_RENDER_SURFACE_IMPL_H_ |
| OLD | NEW |