Index: cc/output/overlay_processor.cc |
diff --git a/cc/output/overlay_processor.cc b/cc/output/overlay_processor.cc |
index baae69dd10ed2bbe04e9178b1948c743a3356d23..463216b3947cfcba3e4bca64d7d89ab6f062c7f6 100644 |
--- a/cc/output/overlay_processor.cc |
+++ b/cc/output/overlay_processor.cc |
@@ -5,6 +5,7 @@ |
#include "cc/output/overlay_processor.h" |
#include "cc/output/output_surface.h" |
+#include "cc/output/overlay_strategy_sandwich.h" |
#include "cc/output/overlay_strategy_single_on_top.h" |
#include "cc/output/overlay_strategy_underlay.h" |
#include "ui/gfx/geometry/rect_conversions.h" |
@@ -12,6 +13,9 @@ |
namespace cc { |
+OverlayProcessor::RendererState::RendererState() : device_scale_factor(1) {} |
+OverlayProcessor::RendererState::~RendererState() {} |
+ |
OverlayProcessor::OverlayProcessor(OutputSurface* surface) : surface_(surface) { |
} |
@@ -21,22 +25,30 @@ void OverlayProcessor::Initialize() { |
OverlayCandidateValidator* candidates = |
surface_->GetOverlayCandidateValidator(); |
if (candidates) { |
+#if defined(OS_MACOSX) |
ccameron
2015/08/23 21:29:05
Is this (the #ifdef) a reasonable way to go about
alexst (slow to review)
2015/08/24 15:07:02
I hope to keep this platform agnostic. Maybe we co
|
+ strategies_.push_back( |
+ scoped_ptr<Strategy>(new OverlayStrategySandwich(candidates))); |
+#else |
strategies_.push_back( |
scoped_ptr<Strategy>(new OverlayStrategySingleOnTop(candidates))); |
strategies_.push_back( |
scoped_ptr<Strategy>(new OverlayStrategyUnderlay(candidates))); |
+#endif |
} |
} |
OverlayProcessor::~OverlayProcessor() {} |
void OverlayProcessor::ProcessForOverlays( |
+ const OverlayProcessor::RendererState& renderer_state, |
RenderPassList* render_passes_in_draw_order, |
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(renderer_state, render_passes_in_draw_order, |
+ candidate_list)) { |
return; |
+ } |
} |
} |