Index: cc/output/overlay_processor.cc |
diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc |
index baae69dd10ed2bbe04e9178b1948c743a3356d23..ab334ec95344aef8d5d98a4cf14a50a001430a54 100644 |
--- a/cc/output/overlay_processor.cc |
+++ b/cc/output/overlay_processor.cc |
@@ -17,15 +17,10 @@ OverlayProcessor::OverlayProcessor(OutputSurface* surface) : surface_(surface) { |
void OverlayProcessor::Initialize() { |
DCHECK(surface_); |
- |
- OverlayCandidateValidator* candidates = |
+ OverlayCandidateValidator* validator = |
surface_->GetOverlayCandidateValidator(); |
- if (candidates) { |
- strategies_.push_back( |
- scoped_ptr<Strategy>(new OverlayStrategySingleOnTop(candidates))); |
- strategies_.push_back( |
- scoped_ptr<Strategy>(new OverlayStrategyUnderlay(candidates))); |
- } |
+ if (validator) |
+ validator->GetStrategies(&strategies_); |
} |
OverlayProcessor::~OverlayProcessor() {} |
@@ -35,8 +30,10 @@ void OverlayProcessor::ProcessForOverlays( |
OverlayCandidateList* candidate_list) { |
for (StrategyList::iterator it = strategies_.begin(); it != strategies_.end(); |
++it) { |
- if ((*it)->Attempt(render_passes_in_draw_order, candidate_list)) |
+ if ((*it)->Attempt(render_passes_in_draw_order, candidate_list, |
+ surface_->device_scale_factor())) { |
return; |
+ } |
} |
} |