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

Unified Diff: cc/texture_uploader.cc

Issue 11418108: cc: Make the ScopedPtrVector and ScopedPtrDeque containers act like STL vector and deque. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: cc/texture_uploader.cc
diff --git a/cc/texture_uploader.cc b/cc/texture_uploader.cc
index f988d69de5b3c3427e72baab2d2afa8d0f96cffb..f4c960cd87137601910de26233d7c9625e5cb213 100644
--- a/cc/texture_uploader.cc
+++ b/cc/texture_uploader.cc
@@ -141,16 +141,16 @@ double TextureUploader::estimatedTexturesPerSecond()
void TextureUploader::beginQuery()
{
- if (m_availableQueries.isEmpty())
- m_availableQueries.append(Query::create(m_context));
+ if (m_availableQueries.empty())
+ m_availableQueries.push_back(Query::create(m_context));
- m_availableQueries.first()->begin();
+ m_availableQueries.front()->begin();
}
void TextureUploader::endQuery()
{
- m_availableQueries.first()->end();
- m_pendingQueries.append(m_availableQueries.takeFirst());
+ m_availableQueries.front()->end();
+ m_pendingQueries.push_back(m_availableQueries.take_front());
m_numBlockingTextureUploads++;
}
@@ -333,14 +333,14 @@ void TextureUploader::uploadWithMapTexSubImage(const uint8* image,
void TextureUploader::processQueries()
{
- while (!m_pendingQueries.isEmpty()) {
- if (m_pendingQueries.first()->isPending())
+ while (!m_pendingQueries.empty()) {
+ if (m_pendingQueries.front()->isPending())
break;
- unsigned usElapsed = m_pendingQueries.first()->value();
+ unsigned usElapsed = m_pendingQueries.front()->value();
HISTOGRAM_CUSTOM_COUNTS("Renderer4.TextureGpuUploadTimeUS", usElapsed, 0, 100000, 50);
- if (!m_pendingQueries.first()->isNonBlocking())
+ if (!m_pendingQueries.front()->isNonBlocking())
m_numBlockingTextureUploads--;
// Remove the min and max value from our history and insert the new one.
@@ -351,7 +351,7 @@ void TextureUploader::processQueries()
}
m_texturesPerSecondHistory.insert(texturesPerSecond);
- m_availableQueries.append(m_pendingQueries.takeFirst());
+ m_availableQueries.push_back(m_pendingQueries.take_front());
}
}

Powered by Google App Engine
This is Rietveld 408576698