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

Unified Diff: cc/CCTextureUpdateController.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCTextureUpdateController.h ('k') | cc/TextureUploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCTextureUpdateController.cpp
diff --git a/cc/CCTextureUpdateController.cpp b/cc/CCTextureUpdateController.cpp
index bbc3e7a0370d97cd78acc094c3ac5a991f854d9a..b58dc522d8f8856b9687b776b2fa78c994a23218 100644
--- a/cc/CCTextureUpdateController.cpp
+++ b/cc/CCTextureUpdateController.cpp
@@ -27,8 +27,8 @@ static const double uploaderBusyTickRate = 0.001;
// Flush interval when performing texture uploads.
static const int textureUploadFlushPeriod = 4;
-// Number of pending update intervals to allow.
-static const size_t maxPendingUpdateIntervals = 2;
+// Number of blocking update intervals to allow.
+static const size_t maxBlockingUpdateIntervals = 4;
} // anonymous namespace
@@ -147,17 +147,17 @@ size_t CCTextureUpdateController::updateMoreTexturesSize() const
return m_textureUpdatesPerTick;
}
-size_t CCTextureUpdateController::maxPendingUpdates() const
+size_t CCTextureUpdateController::maxBlockingUpdates() const
{
- return updateMoreTexturesSize() * maxPendingUpdateIntervals;
+ return updateMoreTexturesSize() * maxBlockingUpdateIntervals;
}
bool CCTextureUpdateController::updateMoreTexturesIfEnoughTimeRemaining()
{
- // Pending uploads will increase when we're too aggressive in our upload
+ // Blocking uploads will increase when we're too aggressive in our upload
// time estimate. We use a different timeout here to prevent unnecessary
- // amounts of idle time when pending uploads have reached the max.
- if (m_uploader->numPendingUploads() >= maxPendingUpdates()) {
+ // amounts of idle time when blocking uploads have reached the max.
+ if (m_uploader->numBlockingUploads() >= maxBlockingUpdates()) {
m_timer->startOneShot(uploaderBusyTickRate);
return true;
}
« no previous file with comments | « cc/CCTextureUpdateController.h ('k') | cc/TextureUploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698