diff options
author | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 18:12:17 +0000 |
---|---|---|
committer | tonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 18:12:17 +0000 |
commit | 8ee625fef92ef0fbc56658041dc45459aca9c312 (patch) | |
tree | 18dcb198a9f696b074a1d91ce87643c838d1a994 /content/port/browser | |
parent | b442543a9dedc630af951b9d3059898870080c01 (diff) | |
download | chromium_src-8ee625fef92ef0fbc56658041dc45459aca9c312.zip chromium_src-8ee625fef92ef0fbc56658041dc45459aca9c312.tar.gz chromium_src-8ee625fef92ef0fbc56658041dc45459aca9c312.tar.bz2 |
Revert 173457 It breaks the scrolling benchmark because smoothScrollBy's
callback is never invoked.
> Telemtry: hooks "chrome.gpuBenchmarking.smoothScrollBy" with java on android.
>
> In order to provide more realistic benchmarks, instead of shortcutting in native via mousewheels,
> let Telemetry cross all the boundaries and synthesize MotionEvents all the way up in java.
>
> BUG=
> TEST=./tools/perf/run_multipage_benchmarks --browser=system smoothness_benchmark tools/perf/page_sets/key_mobile_sites.json
>
>
> Review URL: https://chromiumcodereview.appspot.com/11415227
TBR=bulach@chromium.org
BUG=166521
Review URL: https://codereview.chromium.org/11613022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173752 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/port/browser')
-rw-r--r-- | content/port/browser/smooth_scroll_gesture.cc | 22 | ||||
-rw-r--r-- | content/port/browser/smooth_scroll_gesture.h | 8 |
2 files changed, 2 insertions, 28 deletions
diff --git a/content/port/browser/smooth_scroll_gesture.cc b/content/port/browser/smooth_scroll_gesture.cc deleted file mode 100644 index b783fc0..0000000 --- a/content/port/browser/smooth_scroll_gesture.cc +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "content/port/browser/smooth_scroll_gesture.h" - -namespace content { - -double SmoothScrollGesture::Tick( - base::TimeTicks now, double desired_interval_ms) { - double position_delta = 10; - if (!last_tick_time_.is_null()) { - double velocity = 10 / desired_interval_ms; - double time_delta = (now - last_tick_time_).InMillisecondsF(); - position_delta = velocity * time_delta; - } - - last_tick_time_ = now; - return position_delta; -} - -} // namespace content diff --git a/content/port/browser/smooth_scroll_gesture.h b/content/port/browser/smooth_scroll_gesture.h index 3b7bec7..4e2c1d9 100644 --- a/content/port/browser/smooth_scroll_gesture.h +++ b/content/port/browser/smooth_scroll_gesture.h @@ -14,9 +14,10 @@ class RenderWidgetHost; // This is a base class representing a single scroll gesture. These gestures are // paired with the rendering benchmarking system to (automatically) measure how -// smoothly chrome is responding to user input. +// smoothnly chrome is responding to user input. class SmoothScrollGesture : public base::RefCounted<SmoothScrollGesture> { public: + // When called, the gesture should compute its state at the provided timestamp // and send the right input events to the provided RenderWidgetHost to // simulate the gesture having run up to that point in time. @@ -28,11 +29,6 @@ class SmoothScrollGesture : public base::RefCounted<SmoothScrollGesture> { protected: friend class base::RefCounted<SmoothScrollGesture>; virtual ~SmoothScrollGesture() {} - - double Tick(base::TimeTicks now, double desired_interval_ms); - - private: - base::TimeTicks last_tick_time_; }; } // namespace content |