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

Unified Diff: cc/output/overlay_strategy_single_on_top.cc

Issue 1304053016: Mac Overlays: Allow multiple overlays with sandwich strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: 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
Index: cc/output/overlay_strategy_single_on_top.cc
diff --git a/cc/output/overlay_strategy_single_on_top.cc b/cc/output/overlay_strategy_single_on_top.cc
index 5670a37f93de2dd06b023a377608406f11b05875..a55816d8237a52e4c1e4fecd697f8b3c2265e415 100644
--- a/cc/output/overlay_strategy_single_on_top.cc
+++ b/cc/output/overlay_strategy_single_on_top.cc
@@ -13,7 +13,7 @@ namespace cc {
OverlayStrategySingleOnTop::~OverlayStrategySingleOnTop() {}
-bool OverlayStrategySingleOnTop::TryOverlay(
+QuadList::Iterator OverlayStrategySingleOnTop::TryOverlay(
OverlayCandidateValidator* capability_checker,
RenderPassList* render_passes_in_draw_order,
OverlayCandidateList* candidate_list,
@@ -34,7 +34,7 @@ bool OverlayStrategySingleOnTop::TryOverlay(
&overlap_rect);
if (rect.Intersects(overlap_rect) &&
!OverlayStrategyCommon::IsInvisibleQuad(*overlap_iter))
- return false;
+ return quad_list.end();
ccameron 2015/09/02 22:22:33 This shouldn't return the end() iter -- we want to
}
// Add our primary surface.
@@ -53,10 +53,11 @@ bool OverlayStrategySingleOnTop::TryOverlay(
// If the candidate can be handled by an overlay, create a pass for it.
if (candidates[1].overlay_handled) {
quad_list.EraseAndInvalidateAllPointers(candidate_iterator);
+ DCHECK(candidate_list->empty());
candidate_list->swap(candidates);
ccameron 2015/09/02 22:22:33 here we want to return STOP -- this strategy only
- return true;
}
- return false;
+
+ return quad_list.end();
ccameron 2015/09/02 22:22:33 likewise about keeping trying.
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698