Chromium Code Reviews| 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 |