| 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 12 matching lines...) Expand all Loading... |
| 23 }; | 23 }; |
| 24 | 24 |
| 25 class CCTextureUpdateController : public CCTimerClient { | 25 class CCTextureUpdateController : public CCTimerClient { |
| 26 WTF_MAKE_NONCOPYABLE(CCTextureUpdateController); | 26 WTF_MAKE_NONCOPYABLE(CCTextureUpdateController); |
| 27 public: | 27 public: |
| 28 static PassOwnPtr<CCTextureUpdateController> create(CCTextureUpdateControlle
rClient* client, CCThread* thread, PassOwnPtr<CCTextureUpdateQueue> queue, CCRes
ourceProvider* resourceProvider, TextureUploader* uploader) | 28 static PassOwnPtr<CCTextureUpdateController> create(CCTextureUpdateControlle
rClient* client, CCThread* thread, PassOwnPtr<CCTextureUpdateQueue> queue, CCRes
ourceProvider* resourceProvider, TextureUploader* uploader) |
| 29 { | 29 { |
| 30 return adoptPtr(new CCTextureUpdateController(client, thread, queue, res
ourceProvider, uploader)); | 30 return adoptPtr(new CCTextureUpdateController(client, thread, queue, res
ourceProvider, uploader)); |
| 31 } | 31 } |
| 32 static size_t maxPartialTextureUpdates(); | 32 static size_t maxPartialTextureUpdates(); |
| 33 static void updateTextures(CCResourceProvider*, TextureUploader*, CCTextureU
pdateQueue*); | |
| 34 | 33 |
| 35 virtual ~CCTextureUpdateController(); | 34 virtual ~CCTextureUpdateController(); |
| 36 | 35 |
| 37 // Discard uploads to textures that were evicted on the impl thread. | 36 // Discard uploads to textures that were evicted on the impl thread. |
| 38 void discardUploadsToEvictedResources(); | 37 void discardUploadsToEvictedResources(); |
| 39 | 38 |
| 40 void performMoreUpdates(double monotonicTimeLimit); | 39 void performMoreUpdates(double monotonicTimeLimit); |
| 41 void finalize(); | 40 void finalize(); |
| 42 | 41 |
| 43 // CCTimerClient implementation. | 42 // CCTimerClient implementation. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 64 CCResourceProvider* m_resourceProvider; | 63 CCResourceProvider* m_resourceProvider; |
| 65 TextureUploader* m_uploader; | 64 TextureUploader* m_uploader; |
| 66 double m_monotonicTimeLimit; | 65 double m_monotonicTimeLimit; |
| 67 size_t m_textureUpdatesPerTick; | 66 size_t m_textureUpdatesPerTick; |
| 68 bool m_firstUpdateAttempt; | 67 bool m_firstUpdateAttempt; |
| 69 }; | 68 }; |
| 70 | 69 |
| 71 } | 70 } |
| 72 | 71 |
| 73 #endif // CCTextureUpdateController_h | 72 #endif // CCTextureUpdateController_h |
| OLD | NEW |