diff options
author | aelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 06:45:20 +0000 |
---|---|---|
committer | aelias@chromium.org <aelias@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-18 06:45:20 +0000 |
commit | 0fc818ec6e012243303de3e013037c8c0221c83f (patch) | |
tree | 968a152d95cd78ac42fa616fd34e2509144b267e /cc/test/scheduler_test_common.h | |
parent | 32eee898d3d502b8b62e8f48f5eb9ac021e3489d (diff) | |
download | chromium_src-0fc818ec6e012243303de3e013037c8c0221c83f.zip chromium_src-0fc818ec6e012243303de3e013037c8c0221c83f.tar.gz chromium_src-0fc818ec6e012243303de3e013037c8c0221c83f.tar.bz2 |
cc: Delay start of scrollbar animation setNeedsRedraw.
This adds a 300ms delay triggered at ScrollEnd in order to avoid
beginning the setNeedsRedraw cycle until we really start fading the
scrollbar, in order to improve performance during non-fling scrolls.
Notes:
- I switched to notifying the animator about ScrollBegin/ScrollEnd when
the currently scrolling layer is attached/detached, and suppress fading
until ScrollEnd.
- The scrollUpdate path is still needed for when the scroll position changes
due to e.g. Javascript, but it's a no-op during a scroll gesture.
- I deleted the pinchGesture logic for simplicity, as there's no
reason to treat pinches differently from scrolls.
- I switches cc::Thread to use TimeDelta for its postDelayedTask since
I ran into some bugs with the flooring to milliseconds. I updated the
few other callers.
NOTRY=true
BUG=181417
Review URL: https://chromiumcodereview.appspot.com/12408028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188684 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/scheduler_test_common.h')
-rw-r--r-- | cc/test/scheduler_test_common.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/test/scheduler_test_common.h b/cc/test/scheduler_test_common.h index e5faaa5..760ba2568 100644 --- a/cc/test/scheduler_test_common.h +++ b/cc/test/scheduler_test_common.h @@ -6,6 +6,7 @@ #define CC_TEST_SCHEDULER_TEST_COMMON_H_ #include "base/memory/scoped_ptr.h" +#include "base/time.h" #include "cc/base/thread.h" #include "cc/delay_based_time_source.h" #include "cc/frame_rate_controller.h" @@ -52,7 +53,8 @@ public: } virtual void PostTask(base::Closure cb) OVERRIDE; - virtual void PostDelayedTask(base::Closure cb, long long delay_ms) OVERRIDE; + virtual void PostDelayedTask(base::Closure cb, base::TimeDelta delay) + OVERRIDE; virtual bool BelongsToCurrentThread() const OVERRIDE; protected: |