diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 22:59:56 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-30 22:59:56 +0000 |
commit | e5e9c02081e6b37f49febeba87863a1dac598949 (patch) | |
tree | 3e2c4fcd2926cc064fd7937e3cdee49e9ef62fd6 /cc/rate_limiter.cc | |
parent | 760d9886b9d56182f6c91944e06f250df6677d33 (diff) | |
download | chromium_src-e5e9c02081e6b37f49febeba87863a1dac598949.zip chromium_src-e5e9c02081e6b37f49febeba87863a1dac598949.tar.gz chromium_src-e5e9c02081e6b37f49febeba87863a1dac598949.tar.bz2 |
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
Diffstat (limited to 'cc/rate_limiter.cc')
-rw-r--r-- | cc/rate_limiter.cc | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/cc/rate_limiter.cc b/cc/rate_limiter.cc index 5d9cf81..fab541e 100644 --- a/cc/rate_limiter.cc +++ b/cc/rate_limiter.cc @@ -13,29 +13,6 @@ namespace cc { -class RateLimiter::Task : public Thread::Task { -public: - static PassOwnPtr<Task> create(RateLimiter* rateLimiter) - { - return adoptPtr(new Task(rateLimiter)); - } - virtual ~Task() { } - -private: - explicit Task(RateLimiter* rateLimiter) - : Thread::Task(this) - , m_rateLimiter(rateLimiter) - { - } - - virtual void performTask() OVERRIDE - { - m_rateLimiter->rateLimitContext(); - } - - scoped_refptr<RateLimiter> m_rateLimiter; -}; - scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client) { return make_scoped_refptr(new RateLimiter(context, client)); @@ -60,7 +37,7 @@ void RateLimiter::start() TRACE_EVENT0("cc", "RateLimiter::start"); m_active = true; - Proxy::mainThread()->postTask(RateLimiter::Task::create(this)); + Proxy::mainThread()->postTask(base::Bind(&RateLimiter::rateLimitContext, this)); } void RateLimiter::stop() |