Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1686)

Unified Diff: cc/rate_limiter.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/rate_limiter.cc
diff --git a/cc/rate_limiter.cc b/cc/rate_limiter.cc
index 5d9cf8191a3791fa1e063257f8410d81efb7e2c7..f5c190016a187c9e8d1ca3a1d9e011326d4d7b5f 100644
--- a/cc/rate_limiter.cc
+++ b/cc/rate_limiter.cc
@@ -36,13 +36,14 @@ private:
scoped_refptr<RateLimiter> m_rateLimiter;
};
-scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
+scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client, Proxy* proxy)
{
- return make_scoped_refptr(new RateLimiter(context, client));
+ return make_scoped_refptr(new RateLimiter(context, client, proxy));
}
-RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
- : m_context(context)
+RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client, Proxy* proxy)
+ : m_proxy(proxy)
+ , m_context(context)
, m_active(false)
, m_client(client)
{
@@ -60,7 +61,7 @@ void RateLimiter::start()
TRACE_EVENT0("cc", "RateLimiter::start");
m_active = true;
- Proxy::mainThread()->postTask(RateLimiter::Task::create(this));
+ m_proxy->mainThread()->postTask(RateLimiter::Task::create(this));
}
void RateLimiter::stop()

Powered by Google App Engine
This is Rietveld 408576698