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

Side by Side Diff: cc/CCTextureUpdateController.h

Issue 11008017: cc: Never block on uploads from previous frame and increase max pending uploads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename numPendingUploads to numBlockingUploads and discardPendingUploads to markPendingUploadsAsNon… Created 8 years, 2 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 | « cc/CCLayerTreeHostImpl.cpp ('k') | 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "CCTextureUpdateQueue.h" 10 #include "CCTextureUpdateQueue.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Virtual for testing. 45 // Virtual for testing.
46 virtual base::TimeTicks now() const; 46 virtual base::TimeTicks now() const;
47 virtual base::TimeDelta updateMoreTexturesTime() const; 47 virtual base::TimeDelta updateMoreTexturesTime() const;
48 virtual size_t updateMoreTexturesSize() const; 48 virtual size_t updateMoreTexturesSize() const;
49 49
50 protected: 50 protected:
51 CCTextureUpdateController(CCTextureUpdateControllerClient*, CCThread*, PassO wnPtr<CCTextureUpdateQueue>, CCResourceProvider*, TextureUploader*); 51 CCTextureUpdateController(CCTextureUpdateControllerClient*, CCThread*, PassO wnPtr<CCTextureUpdateQueue>, CCResourceProvider*, TextureUploader*);
52 52
53 static size_t maxFullUpdatesPerTick(TextureUploader*); 53 static size_t maxFullUpdatesPerTick(TextureUploader*);
54 54
55 size_t maxPendingUpdates() const; 55 size_t maxBlockingUpdates() const;
56 56
57 // This returns true when there were textures left to update. 57 // This returns true when there were textures left to update.
58 bool updateMoreTexturesIfEnoughTimeRemaining(); 58 bool updateMoreTexturesIfEnoughTimeRemaining();
59 void updateMoreTexturesNow(); 59 void updateMoreTexturesNow();
60 60
61 CCTextureUpdateControllerClient* m_client; 61 CCTextureUpdateControllerClient* m_client;
62 OwnPtr<CCTimer> m_timer; 62 OwnPtr<CCTimer> m_timer;
63 OwnPtr<CCTextureUpdateQueue> m_queue; 63 OwnPtr<CCTextureUpdateQueue> m_queue;
64 bool m_contentsTexturesPurged; 64 bool m_contentsTexturesPurged;
65 CCResourceProvider* m_resourceProvider; 65 CCResourceProvider* m_resourceProvider;
66 TextureUploader* m_uploader; 66 TextureUploader* m_uploader;
67 base::TimeTicks m_timeLimit; 67 base::TimeTicks m_timeLimit;
68 size_t m_textureUpdatesPerTick; 68 size_t m_textureUpdatesPerTick;
69 bool m_firstUpdateAttempt; 69 bool m_firstUpdateAttempt;
70 70
71 private: 71 private:
72 DISALLOW_COPY_AND_ASSIGN(CCTextureUpdateController); 72 DISALLOW_COPY_AND_ASSIGN(CCTextureUpdateController);
73 }; 73 };
74 74
75 } 75 }
76 76
77 #endif // CCTextureUpdateController_h 77 #endif // CCTextureUpdateController_h
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostImpl.cpp ('k') | cc/CCTextureUpdateController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698