cc: Never block on uploads from previous frame and increase max pending uploads.
By discarding pending uploads after drawing we allow multiple frames with
reasonable amounts of uploads in the pipeline at the same time.
Also increase maxPendingUpdateIntervals to allow an estimated 16ms of
texture uploads per frame without blocking.
BUG=152631
TEST=manual
Review URL: https://chromiumcodereview.appspot.com/11008017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159654 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/CCTextureUpdateController.cpp b/cc/CCTextureUpdateController.cpp
index bbc3e7a..b58dc52 100644
--- a/cc/CCTextureUpdateController.cpp
+++ b/cc/CCTextureUpdateController.cpp
@@ -27,8 +27,8 @@
// 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 @@
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;
}