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

Unified Diff: cc/animation/scroll_offset_animation_curve.cc

Issue 1115653002: Pass gfx structs by const ref(gfx::Vector2D/F) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing some build issue Created 5 years, 8 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 | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/scroll_offset_animation_curve.cc
diff --git a/cc/animation/scroll_offset_animation_curve.cc b/cc/animation/scroll_offset_animation_curve.cc
index 87a29c1e0777c708cd0c285cdca1f1ff72d3b35c..68761fbf8d17abd30c5f844ac83080607ad69535 100644
--- a/cc/animation/scroll_offset_animation_curve.cc
+++ b/cc/animation/scroll_offset_animation_curve.cc
@@ -18,11 +18,11 @@ namespace cc {
namespace {
-static float MaximumDimension(gfx::Vector2dF delta) {
+static float MaximumDimension(const gfx::Vector2dF& delta) {
return std::max(std::abs(delta.x()), std::abs(delta.y()));
}
-static base::TimeDelta DurationFromDelta(gfx::Vector2dF delta) {
+static base::TimeDelta DurationFromDelta(const gfx::Vector2dF& delta) {
// The duration of a scroll animation depends on the size of the scroll.
// The exact relationship between the size and the duration isn't specified
// by the CSSOM View smooth scroll spec and is instead left up to user agents
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698