| 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 13 matching lines...) Expand all Loading... |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 class CCTextureUpdateController : public CCTimerClient { | 26 class CCTextureUpdateController : public CCTimerClient { |
| 27 WTF_MAKE_NONCOPYABLE(CCTextureUpdateController); | 27 WTF_MAKE_NONCOPYABLE(CCTextureUpdateController); |
| 28 public: | 28 public: |
| 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*); |
| 35 | 35 |
| 36 virtual ~CCTextureUpdateController(); | 36 virtual ~CCTextureUpdateController(); |
| 37 | 37 |
| 38 void performMoreUpdates(double monotonicTimeLimit); | 38 void performMoreUpdates(double monotonicTimeLimit); |
| 39 void finalize(); | 39 void finalize(); |
| 40 | 40 |
| 41 // CCTimerClient implementation. | 41 // CCTimerClient implementation. |
| 42 virtual void onTimerFired() OVERRIDE; | 42 virtual void onTimerFired() OVERRIDE; |
| 43 | 43 |
| 44 // Virtual for testing. | 44 // Virtual for testing. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 60 CCResourceProvider* m_resourceProvider; | 60 CCResourceProvider* m_resourceProvider; |
| 61 TextureCopier* m_copier; | 61 TextureCopier* m_copier; |
| 62 TextureUploader* m_uploader; | 62 TextureUploader* m_uploader; |
| 63 double m_monotonicTimeLimit; | 63 double m_monotonicTimeLimit; |
| 64 bool m_firstUpdateAttempt; | 64 bool m_firstUpdateAttempt; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } | 67 } |
| 68 | 68 |
| 69 #endif // CCTextureUpdateController_h | 69 #endif // CCTextureUpdateController_h |
| OLD | NEW |