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

Unified Diff: cc/output/overlay_processor.cc

Issue 1376883004: Overlays: Remove special casing of primary overlay plane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missed file Created 5 years, 3 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/gl_renderer_unittest.cc ('k') | cc/output/overlay_strategy_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_processor.cc
diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc
index ab334ec95344aef8d5d98a4cf14a50a001430a54..f177b2e65f329d05e20388aa9d28f9ab3fcbe2a2 100644
--- a/cc/output/overlay_processor.cc
+++ b/cc/output/overlay_processor.cc
@@ -28,6 +28,23 @@ OverlayProcessor::~OverlayProcessor() {}
void OverlayProcessor::ProcessForOverlays(
achaulk 2015/09/30 19:04:19 This doesn't always get called, because there are
RenderPassList* render_passes_in_draw_order,
OverlayCandidateList* candidate_list) {
+ RenderPass* root_render_pass = render_passes_in_draw_order->back();
+ DCHECK(root_render_pass);
+
+ // If we had no validator, or it had no strategies, schedule no planes.
+ if (strategies_.empty())
achaulk 2015/09/30 19:04:19 Having no strategies should be valid, but this wil
ccameron 2015/10/01 18:59:31 Moving the primary plane to DirectRenderer cleared
+ return;
+
+ // Create the overlay candidate for the primary surface, and mark it as always
+ // handled.
+ OverlayCandidate primary_surface;
+ primary_surface.display_rect = gfx::RectF(root_render_pass->output_rect);
achaulk 2015/09/30 19:04:19 This needs to be in texture coordinates, eg 0..1
ccameron 2015/10/01 18:59:31 Are you sure -- display_rect is read in GLRenderer
achaulk 2015/10/01 19:41:46 Oh right, this one is pixel coordinates. You do ne
ccameron 2015/10/01 21:08:48 That's done by the ctor at https://code.google.co
+ primary_surface.quad_rect_in_target_space = root_render_pass->output_rect;
+ primary_surface.use_output_surface_for_resource = true;
+ primary_surface.overlay_handled = true;
+ DCHECK(candidate_list->empty());
+ candidate_list->push_back(primary_surface);
+
for (StrategyList::iterator it = strategies_.begin(); it != strategies_.end();
++it) {
if ((*it)->Attempt(render_passes_in_draw_order, candidate_list,
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/output/overlay_strategy_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698