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

Unified Diff: cc/output/overlay_strategy_sandwich.cc

Issue 1380653003: Mac Overlays: Allow SolidColor and Tile quads to be candidates for overlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AllOrNothing2
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/overlay_strategy_all_or_nothing.cc ('k') | cc/output/overlay_strategy_single_on_top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_sandwich.cc
diff --git a/cc/output/overlay_strategy_sandwich.cc b/cc/output/overlay_strategy_sandwich.cc
index 79279adbe9c3ec1bfcd494036e9d25b332f434e2..3a0213b9cd12adf703fd8904bbbb34c50d3f8080 100644
--- a/cc/output/overlay_strategy_sandwich.cc
+++ b/cc/output/overlay_strategy_sandwich.cc
@@ -46,10 +46,13 @@ bool OverlayStrategySandwich::Attempt(ResourceProvider* resource_provider,
QuadList& quad_list = render_passes->back()->quad_list;
for (auto it = quad_list.begin(); it != quad_list.end();) {
OverlayCandidate candidate;
- if (OverlayCandidate::FromDrawQuad(resource_provider, *it, &candidate))
+ if (it->material == DrawQuad::IO_SURFACE_CONTENT &&
+ capability_checker_->IsSupportedQuad(*it) &&
+ OverlayCandidate::FromDrawQuad(resource_provider, *it, &candidate)) {
it = TryOverlay(render_passes->back(), candidate_list, candidate, it);
- else
+ } else {
++it;
+ }
}
return candidate_list->size() > 1;
@@ -106,7 +109,7 @@ QuadList::Iterator OverlayStrategySandwich::TryOverlay(
}
// Add the candidate's overlay.
- DCHECK(candidate.resource_id);
+ DCHECK(candidate.resource.resource_id);
OverlayCandidateList new_candidate_list = *candidate_list;
new_candidate_list.push_back(candidate);
OverlayCandidate& new_candidate = new_candidate_list.back();
@@ -128,7 +131,7 @@ QuadList::Iterator OverlayStrategySandwich::TryOverlay(
1.f / pixel_bounds.height());
main_image_on_top.plane_z_order = 2;
main_image_on_top.transform = gfx::OVERLAY_TRANSFORM_NONE;
- main_image_on_top.use_output_surface_for_resource = true;
+ main_image_on_top.resource_type = OverlayCandidate::USE_OUTPUT_SURFACE;
new_candidate_list.push_back(main_image_on_top);
}
« no previous file with comments | « cc/output/overlay_strategy_all_or_nothing.cc ('k') | cc/output/overlay_strategy_single_on_top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698