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

Unified Diff: cc/output/overlay_strategy_common.cc

Issue 1383293002: Revert of Overlays: Remove special casing of primary overlay plane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/output/output_surface.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_common.cc
diff --git a/cc/output/overlay_strategy_common.cc b/cc/output/overlay_strategy_common.cc
index 36728dd9baf7ba48ba51dcb671f055d35ea612f2..5048b1a1c074b8e92a07bfc72ef4c65334d47c87 100644
--- a/cc/output/overlay_strategy_common.cc
+++ b/cc/output/overlay_strategy_common.cc
@@ -33,6 +33,12 @@
return false;
RenderPass* root_render_pass = render_passes_in_draw_order->back();
DCHECK(root_render_pass);
+
+ // Add our primary surface.
+ OverlayCandidate main_image;
+ main_image.display_rect = gfx::RectF(root_render_pass->output_rect);
+ DCHECK(candidate_list->empty());
+ candidate_list->push_back(main_image);
bool created_overlay = false;
QuadList& quad_list = root_render_pass->quad_list;
@@ -56,6 +62,11 @@
created_overlay = true;
break;
}
+ }
+
+ if (!created_overlay) {
+ DCHECK_EQ(1u, candidate_list->size());
+ candidate_list->clear();
}
return created_overlay;
« no previous file with comments | « cc/output/output_surface.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698