Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: components/viz/service/display/surface_aggregator.h

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Reduce unneeded code in surface aggregator and add more test. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 cc::RenderPassList* dest_pass_list_; 193 cc::RenderPassList* dest_pass_list_;
194 194
195 // This is the set of aggregated pass ids that are affected by filters that 195 // This is the set of aggregated pass ids that are affected by filters that
196 // move pixels. 196 // move pixels.
197 base::flat_set<cc::RenderPassId> moved_pixel_passes_; 197 base::flat_set<cc::RenderPassId> moved_pixel_passes_;
198 198
199 // This is the set of aggregated pass ids that are drawn by copy requests, so 199 // This is the set of aggregated pass ids that are drawn by copy requests, so
200 // should not have their damage rects clipped to the root damage rect. 200 // should not have their damage rects clipped to the root damage rect.
201 base::flat_set<cc::RenderPassId> copy_request_passes_; 201 base::flat_set<cc::RenderPassId> copy_request_passes_;
202 202
203 // This is the set of aggregated pass ids that are drawn by force render
204 // surface, so should not have their damage rects clipped to the root damage
205 // rect.
206 base::flat_set<cc::RenderPassId> cached_render_surface_passes_;
207
203 // This maps each aggregated pass id to the set of (aggregated) pass ids 208 // This maps each aggregated pass id to the set of (aggregated) pass ids
204 // that its RenderPassDrawQuads depend on 209 // that its RenderPassDrawQuads depend on
205 base::flat_map<cc::RenderPassId, base::flat_set<cc::RenderPassId>> 210 base::flat_map<cc::RenderPassId, base::flat_set<cc::RenderPassId>>
206 render_pass_dependencies_; 211 render_pass_dependencies_;
207 212
208 // The root damage rect of the currently-aggregating frame. 213 // The root damage rect of the currently-aggregating frame.
209 gfx::Rect root_damage_rect_; 214 gfx::Rect root_damage_rect_;
210 215
211 // True if the frame that's currently being aggregated has copy requests. 216 // True if the frame that's currently being aggregated has copy requests.
212 // This is valid during Aggregate after PrewalkTree is called. 217 // This is valid during Aggregate after PrewalkTree is called.
213 bool has_copy_requests_; 218 bool has_copy_requests_;
214 219
220 // True if the frame that's currently being aggregated has force render
221 // surface. This is valid during Aggregate after PrewalkTree is called.
222 bool has_cached_render_surfaces_;
223
215 // Tracks UMA stats for SurfaceDrawQuads during a call to Aggregate(). 224 // Tracks UMA stats for SurfaceDrawQuads during a call to Aggregate().
216 SurfaceDrawQuadUmaStats uma_stats_; 225 SurfaceDrawQuadUmaStats uma_stats_;
217 226
218 base::WeakPtrFactory<SurfaceAggregator> weak_factory_; 227 base::WeakPtrFactory<SurfaceAggregator> weak_factory_;
219 228
220 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); 229 DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator);
221 }; 230 };
222 231
223 } // namespace viz 232 } // namespace viz
224 233
225 #endif // COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_ 234 #endif // COMPONENTS_VIZ_SERVICE_DISPLAY_SURFACE_AGGREGATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698