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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 2855723002: Don't submit frames with no render passes in cc tests (Closed)
Patch Set: c Created 3 years, 7 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
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 935b9f7c243217079afe0e7d7ee5b382dd02f22f..b9a679fdac16948605c7980a29930eadbd153359 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -625,14 +625,12 @@ gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id,
provider_ ? provider_->GetChildToParentMap(child_id) : empty_map;
CHECK(debug_weak_this.get());
- if (!frame.render_pass_list.empty()) {
- int remapped_pass_id =
- RemapPassId(frame.render_pass_list.back()->id, surface_id);
- if (in_moved_pixel_surface)
- moved_pixel_passes_.insert(remapped_pass_id);
- if (parent_pass_id)
- render_pass_dependencies_[parent_pass_id].insert(remapped_pass_id);
- }
+ int remapped_pass_id =
+ RemapPassId(frame.render_pass_list.back()->id, surface_id);
+ if (in_moved_pixel_surface)
+ moved_pixel_passes_.insert(remapped_pass_id);
+ if (parent_pass_id)
+ render_pass_dependencies_[parent_pass_id].insert(remapped_pass_id);
struct SurfaceInfo {
SurfaceInfo(const SurfaceId& id,
@@ -722,12 +720,10 @@ gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id,
gfx::Rect damage_rect;
gfx::Rect full_damage;
- if (!frame.render_pass_list.empty()) {
- RenderPass* last_pass = frame.render_pass_list.back().get();
- full_damage = last_pass->output_rect;
- damage_rect =
- DamageRectForSurface(surface, *last_pass, last_pass->output_rect);
- }
+ RenderPass* last_pass = frame.render_pass_list.back().get();
+ full_damage = last_pass->output_rect;
+ damage_rect =
+ DamageRectForSurface(surface, *last_pass, last_pass->output_rect);
// Avoid infinite recursion by adding current surface to
// referenced_surfaces_.
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_aggregator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698