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

Side by Side Diff: cc/ThrottledTextureUploader.cpp

Issue 10957007: cc: Do not report old query values when reused (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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 #include "config.h" 5 #include "config.h"
6 #include "ThrottledTextureUploader.h" 6 #include "ThrottledTextureUploader.h"
7 7
8 #include "Extensions3DChromium.h" 8 #include "Extensions3DChromium.h"
9 #include <algorithm> 9 #include <algorithm>
10 #include <public/WebGraphicsContext3D.h> 10 #include <public/WebGraphicsContext3D.h>
(...skipping 26 matching lines...) Expand all
37 m_queryId = m_context->createQueryEXT(); 37 m_queryId = m_context->createQueryEXT();
38 } 38 }
39 39
40 ThrottledTextureUploader::Query::~Query() 40 ThrottledTextureUploader::Query::~Query()
41 { 41 {
42 m_context->deleteQueryEXT(m_queryId); 42 m_context->deleteQueryEXT(m_queryId);
43 } 43 }
44 44
45 void ThrottledTextureUploader::Query::begin() 45 void ThrottledTextureUploader::Query::begin()
46 { 46 {
47 m_hasValue = false;
47 m_context->beginQueryEXT(Extensions3DChromium::COMMANDS_ISSUED_CHROMIUM, m_q ueryId); 48 m_context->beginQueryEXT(Extensions3DChromium::COMMANDS_ISSUED_CHROMIUM, m_q ueryId);
48 } 49 }
49 50
50 void ThrottledTextureUploader::Query::end(double texturesUploaded) 51 void ThrottledTextureUploader::Query::end(double texturesUploaded)
51 { 52 {
52 m_context->endQueryEXT(Extensions3DChromium::COMMANDS_ISSUED_CHROMIUM); 53 m_context->endQueryEXT(Extensions3DChromium::COMMANDS_ISSUED_CHROMIUM);
53 m_texturesUploaded = texturesUploaded; 54 m_texturesUploaded = texturesUploaded;
54 } 55 }
55 56
56 bool ThrottledTextureUploader::Query::isPending() 57 bool ThrottledTextureUploader::Query::isPending()
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 167
167 // Remove the oldest values from our history and insert the new one 168 // Remove the oldest values from our history and insert the new one
168 m_texturesPerSecondHistory.pop_back(); 169 m_texturesPerSecondHistory.pop_back();
169 m_texturesPerSecondHistory.push_front(texturesPerSecond); 170 m_texturesPerSecondHistory.push_front(texturesPerSecond);
170 171
171 m_availableQueries.append(m_pendingQueries.takeFirst()); 172 m_availableQueries.append(m_pendingQueries.takeFirst());
172 } 173 }
173 } 174 }
174 175
175 } 176 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698