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

Side by Side Diff: cc/CCTextureUpdateController.h

Issue 10917265: cc: Remove partial texture updates from scheduler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/startMoreUpdates/performMoreUpdates/ 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/CCTextureUpdateController.cpp » ('j') | no next file with comments »
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>
11 #include <wtf/OwnPtr.h> 11 #include <wtf/OwnPtr.h>
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class TextureCopier; 15 class TextureCopier;
16 class TextureUploader; 16 class TextureUploader;
17 17
18 class CCTextureUpdateControllerClient { 18 class CCTextureUpdateControllerClient {
19 public: 19 public:
20 virtual void updateTexturesCompleted() = 0; 20 virtual void readyToFinalizeTextureUpdates() = 0;
21 21
22 protected: 22 protected:
23 virtual ~CCTextureUpdateControllerClient() { } 23 virtual ~CCTextureUpdateControllerClient() { }
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*, size_t count);
35 35
36 virtual ~CCTextureUpdateController(); 36 virtual ~CCTextureUpdateController();
37 37
38 void updateMoreTextures(double monotonicTimeLimit); 38 void performMoreUpdates(double monotonicTimeLimit);
39 void finalize();
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
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
OLDNEW
« no previous file with comments | « no previous file | cc/CCTextureUpdateController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698