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

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: 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/trees/layer_tree_host_unittest_video.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 8fe74d0f3e095eaadd684454d4db34eeaf4c30ff..b3e72ab5e20e94b752749dc12b276286964a1613 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1245,7 +1245,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.
@@ -1268,7 +1268,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) {
@@ -1344,7 +1344,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,
« no previous file with comments | « cc/trees/layer_tree_host_unittest_video.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698