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

Side by Side Diff: cc/CCTextureUpdateController.h

Issue 10916292: Adaptively throttle texture uploads (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Do not vary partial upload limit 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/CCTextureUpdateController.cpp » ('j') | cc/CCTextureUpdateController.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CCTextureUpdateController_h 5 #ifndef CCTextureUpdateController_h
6 #define CCTextureUpdateController_h 6 #define CCTextureUpdateController_h
7 7
8 #include "CCTextureUpdateQueue.h" 8 #include "CCTextureUpdateQueue.h"
9 #include "CCTimer.h" 9 #include "CCTimer.h"
10 #include <wtf/Noncopyable.h> 10 #include <wtf/Noncopyable.h>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual void onTimerFired() OVERRIDE; 42 virtual void onTimerFired() OVERRIDE;
43 43
44 // Virtual for testing. 44 // Virtual for testing.
45 virtual double monotonicTimeNow() const; 45 virtual double monotonicTimeNow() const;
46 virtual double updateMoreTexturesTime() const; 46 virtual double updateMoreTexturesTime() const;
47 virtual size_t updateMoreTexturesSize() const; 47 virtual size_t updateMoreTexturesSize() const;
48 48
49 protected: 49 protected:
50 CCTextureUpdateController(CCTextureUpdateControllerClient*, CCThread*, PassO wnPtr<CCTextureUpdateQueue>, CCResourceProvider*, TextureCopier*, TextureUploade r*); 50 CCTextureUpdateController(CCTextureUpdateControllerClient*, CCThread*, PassO wnPtr<CCTextureUpdateQueue>, CCResourceProvider*, TextureCopier*, TextureUploade r*);
51 51
52 static size_t maxFullUpdatesPerTick(TextureUploader*);
53
52 // This returns true when there were textures left to update. 54 // This returns true when there were textures left to update.
53 bool updateMoreTexturesIfEnoughTimeRemaining(); 55 bool updateMoreTexturesIfEnoughTimeRemaining();
54 void updateMoreTexturesNow(); 56 void updateMoreTexturesNow();
55 57
56 CCTextureUpdateControllerClient* m_client; 58 CCTextureUpdateControllerClient* m_client;
57 OwnPtr<CCTimer> m_timer; 59 OwnPtr<CCTimer> m_timer;
58 OwnPtr<CCTextureUpdateQueue> m_queue; 60 OwnPtr<CCTextureUpdateQueue> m_queue;
59 bool m_contentsTexturesPurged; 61 bool m_contentsTexturesPurged;
60 CCResourceProvider* m_resourceProvider; 62 CCResourceProvider* m_resourceProvider;
61 TextureCopier* m_copier; 63 TextureCopier* m_copier;
62 TextureUploader* m_uploader; 64 TextureUploader* m_uploader;
63 double m_monotonicTimeLimit; 65 double m_monotonicTimeLimit;
66 size_t m_textureUpdatesPerTick;
64 bool m_firstUpdateAttempt; 67 bool m_firstUpdateAttempt;
65 }; 68 };
66 69
67 } 70 }
68 71
69 #endif // CCTextureUpdateController_h 72 #endif // CCTextureUpdateController_h
OLDNEW
« no previous file with comments | « no previous file | cc/CCTextureUpdateController.cpp » ('j') | cc/CCTextureUpdateController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698