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

Unified Diff: cc/output/overlay_strategy_common.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_strategy_common.h ('k') | cc/output/overlay_strategy_sandwich.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/overlay_strategy_common.cc
diff --git a/cc/output/overlay_strategy_common.cc b/cc/output/overlay_strategy_common.cc
index 7da74caacaeb36214234c55c3febad11132f29e5..5d79cd09878555a375dd715f0421b92079738617 100644
--- a/cc/output/overlay_strategy_common.cc
+++ b/cc/output/overlay_strategy_common.cc
@@ -18,15 +18,16 @@
namespace cc {
OverlayStrategyCommon::OverlayStrategyCommon(
- OverlayCandidateValidator* capability_checker)
- : capability_checker_(capability_checker) {
-}
+ OverlayCandidateValidator* capability_checker,
+ OverlayStrategyCommonDelegate* delegate)
+ : capability_checker_(capability_checker), delegate_(delegate) {}
OverlayStrategyCommon::~OverlayStrategyCommon() {
}
bool OverlayStrategyCommon::Attempt(RenderPassList* render_passes_in_draw_order,
- OverlayCandidateList* candidate_list) {
+ OverlayCandidateList* candidate_list,
+ float device_scale_factor) {
if (!capability_checker_)
return false;
RenderPass* root_render_pass = render_passes_in_draw_order->back();
@@ -38,8 +39,9 @@ bool OverlayStrategyCommon::Attempt(RenderPassList* render_passes_in_draw_order,
const DrawQuad* draw_quad = *it;
if (IsOverlayQuad(draw_quad) &&
GetCandidateQuadInfo(*draw_quad, &candidate) &&
- TryOverlay(capability_checker_, render_passes_in_draw_order,
- candidate_list, candidate, it))
+ delegate_->TryOverlay(capability_checker_, render_passes_in_draw_order,
+ candidate_list, candidate, it,
+ device_scale_factor))
return true;
}
return false;
@@ -58,6 +60,7 @@ bool OverlayStrategyCommon::IsOverlayQuad(const DrawQuad* draw_quad) {
}
}
+// static
bool OverlayStrategyCommon::IsInvisibleQuad(const DrawQuad* draw_quad) {
if (draw_quad->material == DrawQuad::SOLID_COLOR) {
const SolidColorDrawQuad* solid_quad =
« no previous file with comments | « cc/output/overlay_strategy_common.h ('k') | cc/output/overlay_strategy_sandwich.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698