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

Unified Diff: cc/output/overlay_strategy_single_on_top.cc

Issue 1314943008: cc: Remove implicit conversions from Rect to RectF in src/cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rectfconvert-cc: rebase-and-sandwich-strategy Created 5 years, 3 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_sandwich.cc ('k') | cc/output/overlay_strategy_underlay.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5670a37f93de2dd06b023a377608406f11b05875..4908eca919852193a63a9b45d830637f93ef7d10 100644
--- a/cc/output/overlay_strategy_single_on_top.cc
+++ b/cc/output/overlay_strategy_single_on_top.cc
@@ -6,6 +6,7 @@
#include <limits>
+#include "cc/base/math_util.h"
#include "cc/output/overlay_candidate_validator.h"
#include "cc/quads/draw_quad.h"
@@ -23,15 +24,16 @@ bool OverlayStrategySingleOnTop::TryOverlay(
RenderPass* root_render_pass = render_passes_in_draw_order->back();
QuadList& quad_list = root_render_pass->quad_list;
const DrawQuad* draw_quad = *candidate_iterator;
- gfx::RectF rect = draw_quad->rect;
- draw_quad->shared_quad_state->quad_to_target_transform.TransformRect(&rect);
+ gfx::RectF rect = MathUtil::MapClippedRect(
+ draw_quad->shared_quad_state->quad_to_target_transform,
+ gfx::RectF(draw_quad->rect));
// Check that no prior quads overlap it.
for (auto overlap_iter = quad_list.cbegin();
overlap_iter != candidate_iterator; ++overlap_iter) {
- gfx::RectF overlap_rect = overlap_iter->rect;
- overlap_iter->shared_quad_state->quad_to_target_transform.TransformRect(
- &overlap_rect);
+ gfx::RectF overlap_rect = MathUtil::MapClippedRect(
+ overlap_iter->shared_quad_state->quad_to_target_transform,
+ gfx::RectF(overlap_iter->rect));
if (rect.Intersects(overlap_rect) &&
!OverlayStrategyCommon::IsInvisibleQuad(*overlap_iter))
return false;
@@ -40,7 +42,7 @@ bool OverlayStrategySingleOnTop::TryOverlay(
// Add our primary surface.
OverlayCandidateList candidates;
OverlayCandidate main_image;
- main_image.display_rect = root_render_pass->output_rect;
+ main_image.display_rect = gfx::RectF(root_render_pass->output_rect);
candidates.push_back(main_image);
// Add the overlay.
« no previous file with comments | « cc/output/overlay_strategy_sandwich.cc ('k') | cc/output/overlay_strategy_underlay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698