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

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: Apply code review comments Created 8 years, 1 month 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
« no previous file with comments | « cc/rate_limiter.h ('k') | cc/render_surface_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/rate_limiter.cc
diff --git a/cc/rate_limiter.cc b/cc/rate_limiter.cc
index 9967a85b043ca7aa72310aa97b5a583b9672abed..3b16e5d9b97fe923fe09e6132a147f8c7c3600c0 100644
--- a/cc/rate_limiter.cc
+++ b/cc/rate_limiter.cc
@@ -7,19 +7,19 @@
#include "cc/rate_limiter.h"
#include "base/debug/trace_event.h"
-#include "cc/proxy.h"
#include "cc/thread.h"
#include <public/WebGraphicsContext3D.h>
namespace cc {
-scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
+scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client, Thread* thread)
{
- return make_scoped_refptr(new RateLimiter(context, client));
+ return make_scoped_refptr(new RateLimiter(context, client, thread));
}
-RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
- : m_context(context)
+RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client, Thread* thread)
+ : m_thread(thread)
+ , m_context(context)
, m_active(false)
, m_client(client)
{
@@ -37,7 +37,7 @@ void RateLimiter::start()
TRACE_EVENT0("cc", "RateLimiter::start");
m_active = true;
- Proxy::mainThread()->postTask(base::Bind(&RateLimiter::rateLimitContext, this));
+ m_thread->postTask(base::Bind(&RateLimiter::rateLimitContext, this));
}
void RateLimiter::stop()
« no previous file with comments | « cc/rate_limiter.h ('k') | cc/render_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698