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

Side by Side Diff: cc/ThrottledTextureUploader.h

Issue 11028129: cc: Improve texture per second calculation and overhead (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Keep a sorted history and discard min/max 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
« no previous file with comments | « no previous file | cc/ThrottledTextureUploader.cpp » ('j') | cc/ThrottledTextureUploader.cpp » ('J')
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 ThrottledTextureUploader_h 5 #ifndef ThrottledTextureUploader_h
6 #define ThrottledTextureUploader_h 6 #define ThrottledTextureUploader_h
7 7
8 #include "TextureUploader.h" 8 #include "TextureUploader.h"
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include <deque> 11 #include <set>
12 #include <wtf/Deque.h> 12 #include <wtf/Deque.h>
13 13
14 namespace WebKit { 14 namespace WebKit {
15 class WebGraphicsContext3D; 15 class WebGraphicsContext3D;
16 } 16 }
17 17
18 namespace cc { 18 namespace cc {
19 19
20 class ThrottledTextureUploader : public TextureUploader { 20 class ThrottledTextureUploader : public TextureUploader {
21 public: 21 public:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 ThrottledTextureUploader(WebKit::WebGraphicsContext3D*); 59 ThrottledTextureUploader(WebKit::WebGraphicsContext3D*);
60 60
61 void beginQuery(); 61 void beginQuery();
62 void endQuery(); 62 void endQuery();
63 void processQueries(); 63 void processQueries();
64 64
65 WebKit::WebGraphicsContext3D* m_context; 65 WebKit::WebGraphicsContext3D* m_context;
66 Deque<OwnPtr<Query> > m_pendingQueries; 66 Deque<OwnPtr<Query> > m_pendingQueries;
67 Deque<OwnPtr<Query> > m_availableQueries; 67 Deque<OwnPtr<Query> > m_availableQueries;
68 std::deque<double> m_texturesPerSecondHistory; 68 std::multiset<double> m_texturesPerSecondHistory;
69 int m_historyRemovalCount;
69 size_t m_numBlockingTextureUploads; 70 size_t m_numBlockingTextureUploads;
70 71
71 DISALLOW_COPY_AND_ASSIGN(ThrottledTextureUploader); 72 DISALLOW_COPY_AND_ASSIGN(ThrottledTextureUploader);
72 }; 73 };
73 74
74 } 75 }
75 76
76 #endif 77 #endif
OLDNEW
« no previous file with comments | « no previous file | cc/ThrottledTextureUploader.cpp » ('j') | cc/ThrottledTextureUploader.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698