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

Unified Diff: components/viz/service/display/surface_aggregator.h

Issue 2873593002: Force use of and cache render surface. (Closed)
Patch Set: Fix test to init has_damage_from_contributing_content_. 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 side-by-side diff with in-line comments
Download patch
Index: components/viz/service/display/surface_aggregator.h
diff --git a/components/viz/service/display/surface_aggregator.h b/components/viz/service/display/surface_aggregator.h
index 55ef709bc92efc16472dfb89bbb3faa5fcad5e58..517d26d445faed8462aa01c671b9126556fddffd 100644
--- a/components/viz/service/display/surface_aggregator.h
+++ b/components/viz/service/display/surface_aggregator.h
@@ -137,7 +137,7 @@ class VIZ_SERVICE_EXPORT SurfaceAggregator {
// child surfaces.
void ProcessAddedAndRemovedSurfaces();
- void PropagateCopyRequestPasses();
+ void PropagatePasses(base::flat_set<cc::RenderPassId>* passes);
danakj 2017/07/19 22:52:55 Please give the variable more context in the name
wutao 2017/07/21 05:59:24 Related to the other comments. Do not need this mo
int ChildIdForSurface(cc::Surface* surface);
gfx::Rect DamageRectForSurface(const cc::Surface* surface,
@@ -191,6 +191,8 @@ class VIZ_SERVICE_EXPORT SurfaceAggregator {
// This is the pass list for the aggregated frame.
cc::RenderPassList* dest_pass_list_;
+ // This maps pass id to itself.
+ base::flat_map<cc::RenderPassId, cc::RenderPass*> id_to_render_pass_map_;
// This is the set of aggregated pass ids that are affected by filters that
// move pixels.
@@ -200,6 +202,11 @@ class VIZ_SERVICE_EXPORT SurfaceAggregator {
// should not have their damage rects clipped to the root damage rect.
base::flat_set<cc::RenderPassId> copy_request_passes_;
+ // This is the set of aggregated pass ids that are drawn by force render
+ // surface, so should not have their damage rects clipped to the root damage
+ // rect.
+ base::flat_set<cc::RenderPassId> cached_render_surface_passes_;
+
// This maps each aggregated pass id to the set of (aggregated) pass ids
// that its RenderPassDrawQuads depend on
base::flat_map<cc::RenderPassId, base::flat_set<cc::RenderPassId>>
@@ -212,6 +219,10 @@ class VIZ_SERVICE_EXPORT SurfaceAggregator {
// This is valid during Aggregate after PrewalkTree is called.
bool has_copy_requests_;
+ // True if the frame that's currently being aggregated has force render
+ // surface. This is valid during Aggregate after PrewalkTree is called.
+ bool has_cached_render_surfaces_;
+
// Tracks UMA stats for SurfaceDrawQuads during a call to Aggregate().
SurfaceDrawQuadUmaStats uma_stats_;

Powered by Google App Engine
This is Rietveld 408576698