OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 static PassOwnPtr<CCTextureUpdateController> create(CCTextureUpdateControlle
rClient* client, CCThread* thread, PassOwnPtr<CCTextureUpdateQueue> queue, CCRes
ourceProvider* resourceProvider, TextureCopier* copier, TextureUploader* uploade
r) | 29 static PassOwnPtr<CCTextureUpdateController> create(CCTextureUpdateControlle
rClient* client, CCThread* thread, PassOwnPtr<CCTextureUpdateQueue> queue, CCRes
ourceProvider* resourceProvider, TextureCopier* copier, TextureUploader* uploade
r) |
30 { | 30 { |
31 return adoptPtr(new CCTextureUpdateController(client, thread, queue, res
ourceProvider, copier, uploader)); | 31 return adoptPtr(new CCTextureUpdateController(client, thread, queue, res
ourceProvider, copier, uploader)); |
32 } | 32 } |
33 static size_t maxPartialTextureUpdates(); | 33 static size_t maxPartialTextureUpdates(); |
34 static void updateTextures(CCResourceProvider*, TextureCopier*, TextureUploa
der*, CCTextureUpdateQueue*, size_t count); | 34 static void updateTextures(CCResourceProvider*, TextureCopier*, TextureUploa
der*, CCTextureUpdateQueue*, size_t count); |
35 | 35 |
36 virtual ~CCTextureUpdateController(); | 36 virtual ~CCTextureUpdateController(); |
37 | 37 |
38 void updateMoreTextures(double monotonicTimeLimit); | 38 void updateMoreTextures(double monotonicTimeLimit); |
| 39 void updateAllTexturesNow(); |
39 | 40 |
40 // CCTimerClient implementation. | 41 // CCTimerClient implementation. |
41 virtual void onTimerFired() OVERRIDE; | 42 virtual void onTimerFired() OVERRIDE; |
42 | 43 |
43 // Virtual for testing. | 44 // Virtual for testing. |
44 virtual double monotonicTimeNow() const; | 45 virtual double monotonicTimeNow() const; |
45 virtual double updateMoreTexturesTime() const; | 46 virtual double updateMoreTexturesTime() const; |
46 virtual size_t updateMoreTexturesSize() const; | 47 virtual size_t updateMoreTexturesSize() const; |
47 | 48 |
48 protected: | 49 protected: |
(...skipping 10 matching lines...) Expand all Loading... |
59 CCResourceProvider* m_resourceProvider; | 60 CCResourceProvider* m_resourceProvider; |
60 TextureCopier* m_copier; | 61 TextureCopier* m_copier; |
61 TextureUploader* m_uploader; | 62 TextureUploader* m_uploader; |
62 double m_monotonicTimeLimit; | 63 double m_monotonicTimeLimit; |
63 bool m_firstUpdateAttempt; | 64 bool m_firstUpdateAttempt; |
64 }; | 65 }; |
65 | 66 |
66 } | 67 } |
67 | 68 |
68 #endif // CCTextureUpdateController_h | 69 #endif // CCTextureUpdateController_h |
OLD | NEW |