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

Unified Diff: cc/rate_limiter.cc

Issue 11369071: A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- cc/rate_limiter.cc (revision 165906)
+++ cc/rate_limiter.cc (working copy)
@@ -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, Thread* thread)
+scoped_refptr<RateLimiter> RateLimiter::create(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
{
- return make_scoped_refptr(new RateLimiter(context, client, thread));
+ return make_scoped_refptr(new RateLimiter(context, client));
}
-RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client, Thread* thread)
- : m_thread(thread)
- , m_context(context)
+RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
+ : m_context(context)
, m_active(false)
, m_client(client)
{
@@ -37,7 +37,7 @@
TRACE_EVENT0("cc", "RateLimiter::start");
m_active = true;
- m_thread->postTask(base::Bind(&RateLimiter::rateLimitContext, this));
+ Proxy::mainThread()->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