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 COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ | 5 #ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ |
6 #define COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ | 6 #define COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // that time. | 186 // that time. |
187 SurfaceIndexMap previous_contained_surfaces_; | 187 SurfaceIndexMap previous_contained_surfaces_; |
188 SurfaceIndexMap contained_surfaces_; | 188 SurfaceIndexMap contained_surfaces_; |
189 | 189 |
190 // After surface validation, every Surface in this set is valid. | 190 // After surface validation, every Surface in this set is valid. |
191 base::flat_set<SurfaceId> valid_surfaces_; | 191 base::flat_set<SurfaceId> valid_surfaces_; |
192 | 192 |
193 // This is the pass list for the aggregated frame. | 193 // This is the pass list for the aggregated frame. |
194 cc::RenderPassList* dest_pass_list_; | 194 cc::RenderPassList* dest_pass_list_; |
195 | 195 |
| 196 // This maps pass id to itself. |
| 197 base::flat_map<cc::RenderPassId, cc::RenderPass*> id_to_render_pass_map_; |
| 198 |
196 // This is the set of aggregated pass ids that are affected by filters that | 199 // This is the set of aggregated pass ids that are affected by filters that |
197 // move pixels. | 200 // move pixels. |
198 base::flat_set<cc::RenderPassId> moved_pixel_passes_; | 201 base::flat_set<cc::RenderPassId> moved_pixel_passes_; |
199 | 202 |
200 // This is the set of aggregated pass ids that are drawn by copy requests, so | 203 // This is the set of aggregated pass ids that are drawn by copy requests, so |
201 // should not have their damage rects clipped to the root damage rect. | 204 // should not have their damage rects clipped to the root damage rect. |
202 base::flat_set<cc::RenderPassId> copy_request_passes_; | 205 base::flat_set<cc::RenderPassId> copy_request_passes_; |
203 | 206 |
| 207 // This is the set of aggregated pass ids that are drawn by cached render |
| 208 // passes, so should not have their damage rects clipped to the root damage |
| 209 // rect. |
| 210 base::flat_set<cc::RenderPassId> cached_render_passes_; |
| 211 |
204 // This maps each aggregated pass id to the set of (aggregated) pass ids | 212 // This maps each aggregated pass id to the set of (aggregated) pass ids |
205 // that its cc::RenderPassDrawQuads depend on | 213 // that its cc::RenderPassDrawQuads depend on |
206 base::flat_map<cc::RenderPassId, base::flat_set<cc::RenderPassId>> | 214 base::flat_map<cc::RenderPassId, base::flat_set<cc::RenderPassId>> |
207 render_pass_dependencies_; | 215 render_pass_dependencies_; |
208 | 216 |
209 // The root damage rect of the currently-aggregating frame. | 217 // The root damage rect of the currently-aggregating frame. |
210 gfx::Rect root_damage_rect_; | 218 gfx::Rect root_damage_rect_; |
211 | 219 |
212 // True if the frame that's currently being aggregated has copy requests. | 220 // True if the frame that's currently being aggregated has copy requests. |
213 // This is valid during Aggregate after PrewalkTree is called. | 221 // This is valid during Aggregate after PrewalkTree is called. |
214 bool has_copy_requests_; | 222 bool has_copy_requests_; |
215 | 223 |
| 224 // True if the frame that's currently being aggregated has cached render |
| 225 // passes. This is valid during Aggregate after PrewalkTree is called. |
| 226 bool has_cached_render_passes_; |
| 227 |
216 // Tracks UMA stats for SurfaceDrawQuads during a call to Aggregate(). | 228 // Tracks UMA stats for SurfaceDrawQuads during a call to Aggregate(). |
217 SurfaceDrawQuadUmaStats uma_stats_; | 229 SurfaceDrawQuadUmaStats uma_stats_; |
218 | 230 |
219 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; | 231 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; |
220 | 232 |
221 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); | 233 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); |
222 }; | 234 }; |
223 | 235 |
224 } // namespace viz | 236 } // namespace viz |
225 | 237 |
226 #endif // COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ | 238 #endif // COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ |
OLD | NEW |