diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 23:18:17 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 23:18:17 +0000 |
commit | 16f1477629252f905088b90b88edbaf9bd53f676 (patch) | |
tree | cd3021d47b3a961586090a8b5d20d33f13bac83e /cc/frame_rate_controller.h | |
parent | dfca4c3357d346e496a847b7657e96ab97e0c4a4 (diff) | |
download | chromium_src-16f1477629252f905088b90b88edbaf9bd53f676.zip chromium_src-16f1477629252f905088b90b88edbaf9bd53f676.tar.gz chromium_src-16f1477629252f905088b90b88edbaf9bd53f676.tar.bz2 |
Revert 165050 - Remove WebKit::Platform dependencies from cc
This removes all dependencies on the static WebKit::Platform pointer from cc.
The biggest change is implementing cc::Thread on top of base::MessageLoopProxy
instead of WebKit::WebThread. For the main thread cc::Thread simply binds to
the current thread's MessageLoopProxy. For the impl thread, the bindings layer
(specifically webkit/compositor_bindings/web_compositor_impl) extracts the
MessageLoopProxy out of the passed in WebThread.
BUG=144539
Review URL: https://codereview.chromium.org/11344004
TBR=jamesr@chromium.org
Review URL: https://codereview.chromium.org/11347050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/frame_rate_controller.h')
-rw-r--r-- | cc/frame_rate_controller.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cc/frame_rate_controller.h b/cc/frame_rate_controller.h index 231ddda..d13936d 100644 --- a/cc/frame_rate_controller.h +++ b/cc/frame_rate_controller.h @@ -7,8 +7,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/memory/weak_ptr.h" #include "base/time.h" +#include "cc/timer.h" namespace cc { @@ -26,7 +26,7 @@ protected: class FrameRateControllerTimeSourceAdapter; -class FrameRateController { +class FrameRateController : public TimerClient { public: explicit FrameRateController(scoped_refptr<TimeSource>); // Alternate form of FrameRateController with unthrottled frame-rate. @@ -59,7 +59,9 @@ protected: void onTimerTick(); void postManualTick(); - void manualTick(); + + // TimerClient implementation (used for unthrottled frame-rate). + virtual void onTimerFired() OVERRIDE; FrameRateControllerClient* m_client; int m_numFramesPending; @@ -71,10 +73,7 @@ protected: // Members for unthrottled frame-rate. bool m_isTimeSourceThrottling; - base::WeakPtrFactory<FrameRateController> m_weakFactory; - Thread* m_thread; - - DISALLOW_COPY_AND_ASSIGN(FrameRateController); + scoped_ptr<Timer> m_manualTicker; }; } // namespace cc |