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

Unified Diff: cc/output/overlay_strategy_single_on_top.cc

Issue 1387283002: cc: Remove redundant is_overlay arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More mojo changes 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
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 d08da5cd31452a8409f9f2d9f5ced28717ce25f9..ca254b2b8f31f402727c1b01927f8abc2afda803 100644
--- a/cc/output/overlay_strategy_single_on_top.cc
+++ b/cc/output/overlay_strategy_single_on_top.cc
@@ -18,12 +18,13 @@ OverlayStrategySingleOnTop::OverlayStrategySingleOnTop(
OverlayStrategySingleOnTop::~OverlayStrategySingleOnTop() {}
-bool OverlayStrategySingleOnTop::Attempt(RenderPassList* render_passes,
+bool OverlayStrategySingleOnTop::Attempt(ResourceProvider* resource_provider,
+ RenderPassList* render_passes,
OverlayCandidateList* candidate_list) {
- QuadList& quad_list = render_passes->back()->quad_list;
dcheng 2015/10/08 04:07:14 FYI, the style guide does allow mutable references
ccameron 2015/10/08 04:36:51 I wonder how line 36 was okay then.
dcheng 2015/10/08 04:45:19 It's not style guide compliant: I imagine it was j
- for (auto it = quad_list.begin(); it != quad_list.end(); ++it) {
+ QuadList* quad_list = &render_passes->back()->quad_list;
+ for (auto it = quad_list->begin(); it != quad_list->end(); ++it) {
OverlayCandidate candidate;
- if (OverlayCandidate::FromDrawQuad(*it, &candidate) &&
+ if (OverlayCandidate::FromDrawQuad(resource_provider, *it, &candidate) &&
TryOverlay(quad_list, candidate_list, candidate, it)) {
return true;
}
@@ -33,12 +34,12 @@ bool OverlayStrategySingleOnTop::Attempt(RenderPassList* render_passes,
}
bool OverlayStrategySingleOnTop::TryOverlay(
- QuadList& quad_list,
+ QuadList* quad_list,
OverlayCandidateList* candidate_list,
const OverlayCandidate& candidate,
QuadList::Iterator candidate_iterator) {
// Check that no prior quads overlap it.
- for (auto overlap_iter = quad_list.cbegin();
+ for (auto overlap_iter = quad_list->cbegin();
dcheng 2015/10/08 04:07:14 If you're going to change this, you may as well ju
ccameron 2015/10/08 04:36:51 Done.
overlap_iter != candidate_iterator; ++overlap_iter) {
gfx::RectF overlap_rect = MathUtil::MapClippedRect(
overlap_iter->shared_quad_state->quad_to_target_transform,
@@ -58,7 +59,7 @@ bool OverlayStrategySingleOnTop::TryOverlay(
// If the candidate can be handled by an overlay, create a pass for it.
if (new_candidate_list.back().overlay_handled) {
- quad_list.EraseAndInvalidateAllPointers(candidate_iterator);
+ quad_list->EraseAndInvalidateAllPointers(candidate_iterator);
candidate_list->swap(new_candidate_list);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698