From e5e9c02081e6b37f49febeba87863a1dac598949 Mon Sep 17 00:00:00 2001 From: "jamesr@chromium.org" Date: Tue, 30 Oct 2012 22:59:56 +0000 Subject: 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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165050 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/frame_rate_controller.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cc/frame_rate_controller.h') diff --git a/cc/frame_rate_controller.h b/cc/frame_rate_controller.h index d13936d..231ddda 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 : public TimerClient { +class FrameRateController { public: explicit FrameRateController(scoped_refptr); // Alternate form of FrameRateController with unthrottled frame-rate. @@ -59,9 +59,7 @@ protected: void onTimerTick(); void postManualTick(); - - // TimerClient implementation (used for unthrottled frame-rate). - virtual void onTimerFired() OVERRIDE; + void manualTick(); FrameRateControllerClient* m_client; int m_numFramesPending; @@ -73,7 +71,10 @@ protected: // Members for unthrottled frame-rate. bool m_isTimeSourceThrottling; - scoped_ptr m_manualTicker; + base::WeakPtrFactory m_weakFactory; + Thread* m_thread; + + DISALLOW_COPY_AND_ASSIGN(FrameRateController); }; } // namespace cc -- cgit v1.1