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

Unified Diff: cc/trees/layer_tree_impl.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: 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
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index ff048674af2bae33feb2d5987282c434be177d98..1273e18ff2bc7675c6998a65a0147d702cd5cd2c 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1231,7 +1231,7 @@ static inline bool LayerClipsSubtree(LayerType* layer) {
static bool PointHitsRect(
const gfx::PointF& screen_space_point,
const gfx::Transform& local_space_to_screen_space_transform,
- const gfx::RectF& local_space_rect,
+ const gfx::Rect& local_space_rect,
float* distance_to_camera) {
// If the transform is not invertible, then assume that this point doesn't hit
// this rect.
@@ -1254,7 +1254,7 @@ static bool PointHitsRect(
if (clipped)
return false;
- if (!local_space_rect.Contains(hit_test_point_in_local_space))
+ if (!gfx::RectF(local_space_rect).Contains(hit_test_point_in_local_space))
return false;
if (distance_to_camera) {
@@ -1330,7 +1330,7 @@ static bool PointIsClippedBySurfaceOrClipRect(
static bool PointHitsLayer(const LayerImpl* layer,
const gfx::PointF& screen_space_point,
float* distance_to_intersection) {
- gfx::RectF content_rect(layer->bounds());
+ gfx::Rect content_rect(layer->bounds());
if (!PointHitsRect(screen_space_point,
layer->screen_space_transform(),
content_rect,

Powered by Google App Engine
This is Rietveld 408576698