summaryrefslogtreecommitdiffstats
path: root/cc/texture_uploader.h
diff options
context:
space:
mode:
authorbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-24 15:12:43 +0000
committerbrianderson@chromium.org <brianderson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-24 15:12:43 +0000
commit687931247aecb1c2eab7928f37d6877ce60c2978 (patch)
treef9469483b3d86a66280b0334468f86d9879e8e13 /cc/texture_uploader.h
parent9a4f618885c1146f258df81205d2d5077c595f87 (diff)
downloadchromium_src-687931247aecb1c2eab7928f37d6877ce60c2978.zip
chromium_src-687931247aecb1c2eab7928f37d6877ce60c2978.tar.gz
chromium_src-687931247aecb1c2eab7928f37d6877ce60c2978.tar.bz2
This keeps a sorted history of the texture upload rate and increases
the history size to improve consistency/accuracy and overhead. Prior to this patch, calling ThrottledTextureUploader::estimatedTexturesPerSecond ran a sort operation, which will be slow for larger history sizes. Instead of keeping a FIFO history, it keeps sorted history and discards the min and max values. BUG=155172 Review URL: https://chromiumcodereview.appspot.com/11028129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/texture_uploader.h')
-rw-r--r--cc/texture_uploader.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/texture_uploader.h b/cc/texture_uploader.h
index 0734783..c317f05 100644
--- a/cc/texture_uploader.h
+++ b/cc/texture_uploader.h
@@ -9,7 +9,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "cc/scoped_ptr_deque.h"
-#include <deque>
+#include <set>
#include "third_party/khronos/GLES2/gl2.h"
namespace WebKit {
@@ -87,7 +87,7 @@ private:
WebKit::WebGraphicsContext3D* m_context;
ScopedPtrDeque<Query> m_pendingQueries;
ScopedPtrDeque<Query> m_availableQueries;
- std::deque<double> m_texturesPerSecondHistory;
+ std::multiset<double> m_texturesPerSecondHistory;
size_t m_numBlockingTextureUploads;
bool m_useMapTexSubImage;