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

Unified Diff: cc/resource_update_controller.h

Issue 11344004: Remove WebKit::Platform dependencies from cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix webkit_compositor_bindings_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
« no previous file with comments | « cc/rate_limiter.cc ('k') | cc/resource_update_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resource_update_controller.h
diff --git a/cc/resource_update_controller.h b/cc/resource_update_controller.h
index a77c93b05d2cbf0c178ab280d5dc4698a3ba538f..740514908a8f60cde42ffab41d9dc310057ed29f 100644
--- a/cc/resource_update_controller.h
+++ b/cc/resource_update_controller.h
@@ -7,13 +7,14 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "base/time.h"
#include "cc/resource_update_queue.h"
-#include "cc/timer.h"
namespace cc {
class ResourceProvider;
+class Thread;
class ResourceUpdateControllerClient {
public:
@@ -23,7 +24,7 @@ protected:
virtual ~ResourceUpdateControllerClient() { }
};
-class ResourceUpdateController : public TimerClient {
+class ResourceUpdateController {
public:
static scoped_ptr<ResourceUpdateController> create(ResourceUpdateControllerClient* client, Thread* thread, scoped_ptr<ResourceUpdateQueue> queue, ResourceProvider* resourceProvider)
{
@@ -39,8 +40,6 @@ public:
void performMoreUpdates(base::TimeTicks timeLimit);
void finalize();
- // TimerClient implementation.
- virtual void onTimerFired() OVERRIDE;
// Virtual for testing.
virtual base::TimeTicks now() const;
@@ -50,6 +49,7 @@ public:
protected:
ResourceUpdateController(ResourceUpdateControllerClient*, Thread*, scoped_ptr<ResourceUpdateQueue>, ResourceProvider*);
+private:
static size_t maxFullUpdatesPerTick(ResourceProvider*);
size_t maxBlockingUpdates() const;
@@ -59,17 +59,19 @@ protected:
// This returns true when there were textures left to update.
bool updateMoreTexturesIfEnoughTimeRemaining();
void updateMoreTexturesNow();
+ void onTimerFired();
ResourceUpdateControllerClient* m_client;
- scoped_ptr<Timer> m_timer;
scoped_ptr<ResourceUpdateQueue> m_queue;
bool m_contentsTexturesPurged;
ResourceProvider* m_resourceProvider;
base::TimeTicks m_timeLimit;
size_t m_textureUpdatesPerTick;
bool m_firstUpdateAttempt;
+ Thread* m_thread;
+ base::WeakPtrFactory<ResourceUpdateController> m_weakFactory;
+ bool m_taskPosted;
-private:
DISALLOW_COPY_AND_ASSIGN(ResourceUpdateController);
};
« no previous file with comments | « cc/rate_limiter.cc ('k') | cc/resource_update_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698