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

Unified Diff: content/browser/renderer_host/input/input_router_impl_perftest.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 | « content/browser/android/overscroll_glow.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/input_router_impl_perftest.cc
diff --git a/content/browser/renderer_host/input/input_router_impl_perftest.cc b/content/browser/renderer_host/input/input_router_impl_perftest.cc
index 8948e9d743a9c901155e291845211d9bb87442e5..5888a8baacdeabc8f76dddb96398921829bd21d9 100644
--- a/content/browser/renderer_host/input/input_router_impl_perftest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_perftest.cc
@@ -108,8 +108,8 @@ class NullIPCSender : public IPC::Sender {
// TODO(jdduke): Use synthetic gesture pipeline, crbug.com/344598.
typedef std::vector<WebGestureEvent> Gestures;
Gestures BuildScrollSequence(size_t steps,
- gfx::Vector2dF origin,
- gfx::Vector2dF distance) {
+ const gfx::Vector2dF& origin,
+ const gfx::Vector2dF& distance) {
Gestures gestures;
const gfx::Vector2dF delta = ScaleVector2d(distance, 1.f / steps);
@@ -135,8 +135,8 @@ Gestures BuildScrollSequence(size_t steps,
typedef std::vector<WebTouchEvent> Touches;
Touches BuildTouchSequence(size_t steps,
- gfx::Vector2dF origin,
- gfx::Vector2dF distance) {
+ const gfx::Vector2dF& origin,
+ const gfx::Vector2dF& distance) {
Touches touches;
const gfx::Vector2dF delta = ScaleVector2d(distance, 1.f / steps);
@@ -298,8 +298,8 @@ class InputRouterImplPerfTest : public testing::Test {
void SimulateTouchAndScrollEventSequence(const char* test_name,
size_t steps,
- gfx::Vector2dF origin,
- gfx::Vector2dF distance,
+ const gfx::Vector2dF& origin,
+ const gfx::Vector2dF& distance,
size_t iterations) {
OnHasTouchEventHandlers(true);
« no previous file with comments | « content/browser/android/overscroll_glow.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698