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

Unified Diff: cc/RateLimiter.cpp

Issue 11122003: [cc] Rename all cc/ filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « cc/RateLimiter.h ('k') | cc/RenderSurfaceChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/RateLimiter.cpp
diff --git a/cc/RateLimiter.cpp b/cc/RateLimiter.cpp
deleted file mode 100644
index a52152561ca1f151d603e4468389330c14dd503e..0000000000000000000000000000000000000000
--- a/cc/RateLimiter.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#if USE(ACCELERATED_COMPOSITING)
-#include "RateLimiter.h"
-
-#include "CCProxy.h"
-#include "CCThread.h"
-#include "TraceEvent.h"
-#include <public/WebGraphicsContext3D.h>
-#include <wtf/RefPtr.h>
-
-namespace cc {
-
-class RateLimiter::Task : public CCThread::Task {
-public:
- static PassOwnPtr<Task> create(RateLimiter* rateLimiter)
- {
- return adoptPtr(new Task(rateLimiter));
- }
- virtual ~Task() { }
-
-private:
- explicit Task(RateLimiter* rateLimiter)
- : CCThread::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));
-}
-
-RateLimiter::RateLimiter(WebKit::WebGraphicsContext3D* context, RateLimiterClient *client)
- : m_context(context)
- , m_active(false)
- , m_client(client)
-{
- ASSERT(context);
-}
-
-RateLimiter::~RateLimiter()
-{
-}
-
-void RateLimiter::start()
-{
- if (m_active)
- return;
-
- TRACE_EVENT0("cc", "RateLimiter::start");
- m_active = true;
- CCProxy::mainThread()->postTask(RateLimiter::Task::create(this));
-}
-
-void RateLimiter::stop()
-{
- TRACE_EVENT0("cc", "RateLimiter::stop");
- m_client = 0;
-}
-
-void RateLimiter::rateLimitContext()
-{
- if (!m_client)
- return;
-
- TRACE_EVENT0("cc", "RateLimiter::rateLimitContext");
-
- m_active = false;
- m_client->rateLimit();
- m_context->rateLimitOffscreenContextCHROMIUM();
-}
-
-}
-#endif // USE(ACCELERATED_COMPOSITING)
« no previous file with comments | « cc/RateLimiter.h ('k') | cc/RenderSurfaceChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698