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

Unified Diff: cc/output/overlay_processor.cc

Issue 1304303002: Mac Overlays: Add sandwich strategy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@overlay_debug
Patch Set: incorporate review feedback Created 5 years, 4 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_processor.h ('k') | cc/output/overlay_strategy_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
}
}
« no previous file with comments | « cc/output/overlay_processor.h ('k') | cc/output/overlay_strategy_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698