| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SURFACES_SURFACE_AGGREGATOR_H_ | 5 #ifndef CC_SURFACES_SURFACE_AGGREGATOR_H_ |
| 6 #define CC_SURFACES_SURFACE_AGGREGATOR_H_ | 6 #define CC_SURFACES_SURFACE_AGGREGATOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 | 10 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // used in the aggregated frame. An entry is removed from the map if it's not | 146 // used in the aggregated frame. An entry is removed from the map if it's not |
| 147 // used for one output frame. | 147 // used for one output frame. |
| 148 base::flat_map<std::pair<SurfaceId, RenderPassId>, RenderPassInfo> | 148 base::flat_map<std::pair<SurfaceId, RenderPassId>, RenderPassInfo> |
| 149 render_pass_allocator_map_; | 149 render_pass_allocator_map_; |
| 150 RenderPassId next_render_pass_id_; | 150 RenderPassId next_render_pass_id_; |
| 151 const bool aggregate_only_damaged_; | 151 const bool aggregate_only_damaged_; |
| 152 bool output_is_secure_; | 152 bool output_is_secure_; |
| 153 | 153 |
| 154 // The color space for the root render pass. If this is different from | 154 // The color space for the root render pass. If this is different from |
| 155 // |blending_color_space_|, then a final render pass to convert between | 155 // |blending_color_space_|, then a final render pass to convert between |
| 156 // the two will be added. | 156 // the two will be added. This space must always be valid. |
| 157 gfx::ColorSpace output_color_space_; | 157 gfx::ColorSpace output_color_space_ = gfx::ColorSpace::CreateSRGB(); |
| 158 // The color space in which blending is done, used for all non-root render | 158 // The color space in which blending is done, used for all non-root render |
| 159 // passes. | 159 // passes. This space must always be valid. |
| 160 gfx::ColorSpace blending_color_space_; | 160 gfx::ColorSpace blending_color_space_ = gfx::ColorSpace::CreateSRGB(); |
| 161 // The id for the final color conversion render pass. | 161 // The id for the final color conversion render pass. |
| 162 RenderPassId color_conversion_render_pass_id_ = 0; | 162 RenderPassId color_conversion_render_pass_id_ = 0; |
| 163 | 163 |
| 164 base::flat_map<SurfaceId, int> surface_id_to_resource_child_id_; | 164 base::flat_map<SurfaceId, int> surface_id_to_resource_child_id_; |
| 165 | 165 |
| 166 // The following state is only valid for the duration of one Aggregate call | 166 // The following state is only valid for the duration of one Aggregate call |
| 167 // and is only stored on the class to avoid having to pass through every | 167 // and is only stored on the class to avoid having to pass through every |
| 168 // function call. | 168 // function call. |
| 169 | 169 |
| 170 // This is the set of surfaces referenced in the aggregation so far, used to | 170 // This is the set of surfaces referenced in the aggregation so far, used to |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 SurfaceDrawQuadUmaStats uma_stats_; | 206 SurfaceDrawQuadUmaStats uma_stats_; |
| 207 | 207 |
| 208 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; | 208 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; |
| 209 | 209 |
| 210 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); | 210 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 } // namespace cc | 213 } // namespace cc |
| 214 | 214 |
| 215 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ | 215 #endif // CC_SURFACES_SURFACE_AGGREGATOR_H_ |
| OLD | NEW |