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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 139233002: [#4] Pass gfx structs by const ref (gfx::PointF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected as per review comments! Created 6 years, 11 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_common.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index c126bb4293741ee29d8d593aab396b0cba298bc3..5e97f14437a1d00c8dcfc3789e157dd2ac17f545 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -2245,7 +2245,7 @@ void LayerTreeHostCommon::CalculateDrawProperties(
}
static bool PointHitsRect(
- gfx::PointF screen_space_point,
+ const gfx::PointF& screen_space_point,
const gfx::Transform& local_space_to_screen_space_transform,
const gfx::RectF& local_space_rect) {
// If the transform is not invertible, then assume that this point doesn't hit
@@ -2270,7 +2270,7 @@ static bool PointHitsRect(
return local_space_rect.Contains(hit_test_point_in_local_space);
}
-static bool PointHitsRegion(gfx::PointF screen_space_point,
+static bool PointHitsRegion(const gfx::PointF& screen_space_point,
const gfx::Transform& screen_space_transform,
const Region& layer_space_region,
float layer_content_scale_x,
@@ -2301,8 +2301,9 @@ static bool PointHitsRegion(gfx::PointF screen_space_point,
gfx::ToRoundedPoint(hit_test_point_in_layer_space));
}
-static bool PointIsClippedBySurfaceOrClipRect(gfx::PointF screen_space_point,
- LayerImpl* layer) {
+static bool PointIsClippedBySurfaceOrClipRect(
+ const gfx::PointF& screen_space_point,
+ LayerImpl* layer) {
LayerImpl* current_layer = layer;
// Walk up the layer tree and hit-test any render_surfaces and any layer
@@ -2335,7 +2336,7 @@ static bool PointIsClippedBySurfaceOrClipRect(gfx::PointF screen_space_point,
}
LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPoint(
- gfx::PointF screen_space_point,
+ const gfx::PointF& screen_space_point,
const LayerImplList& render_surface_layer_list) {
LayerImpl* found_layer = NULL;
@@ -2381,7 +2382,7 @@ LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPoint(
}
LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(
- gfx::PointF screen_space_point,
+ const gfx::PointF& screen_space_point,
const LayerImplList& render_surface_layer_list) {
// First find out which layer was hit from the saved list of visible layers
// in the most recent frame.
@@ -2401,7 +2402,7 @@ LayerImpl* LayerTreeHostCommon::FindLayerThatIsHitByPointInTouchHandlerRegion(
}
bool LayerTreeHostCommon::LayerHasTouchEventHandlersAt(
- gfx::PointF screen_space_point,
+ const gfx::PointF& screen_space_point,
LayerImpl* layer_impl) {
if (layer_impl->touch_event_handler_region().IsEmpty())
return false;
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698