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

Unified Diff: cc/trees/layer_tree_host_impl.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_impl.h ('k') | cc/trees/layer_tree_host_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_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 74171b600c1524228fc6d331a4cd1c7843689d22..421cd21376210896ed90730f91bde416c565317f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1981,7 +1981,8 @@ static LayerImpl* NextScrollLayer(LayerImpl* layer) {
}
LayerImpl* LayerTreeHostImpl::FindScrollLayerForDeviceViewportPoint(
- gfx::PointF device_viewport_point, InputHandler::ScrollInputType type,
+ const gfx::PointF& device_viewport_point,
+ InputHandler::ScrollInputType type,
LayerImpl* layer_impl, bool* scroll_on_main_thread) const {
DCHECK(scroll_on_main_thread);
@@ -2060,7 +2061,7 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin(
gfx::Vector2dF LayerTreeHostImpl::ScrollLayerWithViewportSpaceDelta(
LayerImpl* layer_impl,
float scale_from_viewport_to_screen_space,
- gfx::PointF viewport_point,
+ const gfx::PointF& viewport_point,
gfx::Vector2dF viewport_delta) {
// Layers with non-invertible screen space transforms should not have passed
// the scroll hit test in the first place.
@@ -2347,7 +2348,7 @@ void LayerTreeHostImpl::NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) {
}
float LayerTreeHostImpl::DeviceSpaceDistanceToLayer(
- gfx::PointF device_viewport_point,
+ const gfx::PointF& device_viewport_point,
LayerImpl* layer_impl) {
if (!layer_impl)
return std::numeric_limits<float>::max();
@@ -2415,7 +2416,7 @@ void LayerTreeHostImpl::MouseMoveAt(gfx::Point viewport_point) {
}
bool LayerTreeHostImpl::HandleMouseOverScrollbar(LayerImpl* layer_impl,
- gfx::PointF device_viewport_point) {
+ const gfx::PointF& device_viewport_point) {
if (layer_impl && layer_impl->ToScrollbarLayer()) {
int scroll_layer_id = layer_impl->ToScrollbarLayer()->ScrollLayerId();
layer_impl = active_tree_->LayerById(scroll_layer_id);
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698