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

Unified Diff: cc/CCTextureUpdateController.h

Issue 10911262: cc: Scheduler will never process a commit until it receives a vsync tick. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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/CCSchedulerTest.cpp ('k') | cc/CCTextureUpdateController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCTextureUpdateController.h
diff --git a/cc/CCTextureUpdateController.h b/cc/CCTextureUpdateController.h
index 6fc8db3d9f78b962c2ec321403911d8c1a6a0e90..3d485a7eea32dd92c357f1244744ae499c9420bb 100644
--- a/cc/CCTextureUpdateController.h
+++ b/cc/CCTextureUpdateController.h
@@ -15,19 +15,26 @@ namespace WebCore {
class TextureCopier;
class TextureUploader;
+class CCTextureUpdateControllerClient {
+public:
+ virtual void updateTexturesCompleted() = 0;
+
+protected:
+ virtual ~CCTextureUpdateControllerClient() { }
+};
+
class CCTextureUpdateController : public CCTimerClient {
WTF_MAKE_NONCOPYABLE(CCTextureUpdateController);
public:
- static PassOwnPtr<CCTextureUpdateController> create(CCThread* thread, PassOwnPtr<CCTextureUpdateQueue> queue, CCResourceProvider* resourceProvider, TextureCopier* copier, TextureUploader* uploader)
+ static PassOwnPtr<CCTextureUpdateController> create(CCTextureUpdateControllerClient* client, CCThread* thread, PassOwnPtr<CCTextureUpdateQueue> queue, CCResourceProvider* resourceProvider, TextureCopier* copier, TextureUploader* uploader)
{
- return adoptPtr(new CCTextureUpdateController(thread, queue, resourceProvider, copier, uploader));
+ return adoptPtr(new CCTextureUpdateController(client, thread, queue, resourceProvider, copier, uploader));
}
static size_t maxPartialTextureUpdates();
static void updateTextures(CCResourceProvider*, TextureCopier*, TextureUploader*, CCTextureUpdateQueue*, size_t count);
virtual ~CCTextureUpdateController();
- bool hasMoreUpdates() const;
void updateMoreTextures(double monotonicTimeLimit);
// CCTimerClient implementation.
@@ -39,11 +46,13 @@ public:
virtual size_t updateMoreTexturesSize() const;
protected:
- CCTextureUpdateController(CCThread*, PassOwnPtr<CCTextureUpdateQueue>, CCResourceProvider*, TextureCopier*, TextureUploader*);
+ CCTextureUpdateController(CCTextureUpdateControllerClient*, CCThread*, PassOwnPtr<CCTextureUpdateQueue>, CCResourceProvider*, TextureCopier*, TextureUploader*);
- void updateMoreTexturesIfEnoughTimeRemaining();
+ // This returns true when there were textures left to update.
+ bool updateMoreTexturesIfEnoughTimeRemaining();
void updateMoreTexturesNow();
+ CCTextureUpdateControllerClient* m_client;
OwnPtr<CCTimer> m_timer;
OwnPtr<CCTextureUpdateQueue> m_queue;
bool m_contentsTexturesPurged;
« no previous file with comments | « cc/CCSchedulerTest.cpp ('k') | cc/CCTextureUpdateController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698