summaryrefslogtreecommitdiffstats
path: root/cc/resources/resource_update_controller.cc
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-22 02:19:26 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-22 02:19:26 +0000
commit4d4ba0b64982ce288ac816c7a33a0d7c228ffd75 (patch)
tree3412caae112ec950c55399673d86a6fe5cdea480 /cc/resources/resource_update_controller.cc
parent9c1418de65f3be1de23b696ca7cc6531ae1fea89 (diff)
downloadchromium_src-4d4ba0b64982ce288ac816c7a33a0d7c228ffd75.zip
chromium_src-4d4ba0b64982ce288ac816c7a33a0d7c228ffd75.tar.gz
chromium_src-4d4ba0b64982ce288ac816c7a33a0d7c228ffd75.tar.bz2
Use more granularity in scheduling software texture uploads.
"Texture" uploads in the software rendering case happen in the CPU on the impl thread, so each individual update can be checked to make sure that it won't hit the deadline, and they don't need to be batched up. BUG=269919 Review URL: https://chromiumcodereview.appspot.com/23190021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218902 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/resource_update_controller.cc')
-rw-r--r--cc/resources/resource_update_controller.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/cc/resources/resource_update_controller.cc b/cc/resources/resource_update_controller.cc
index a46a7d1..3c8b1e7 100644
--- a/cc/resources/resource_update_controller.cc
+++ b/cc/resources/resource_update_controller.cc
@@ -16,9 +16,6 @@ namespace {
const size_t kPartialTextureUpdatesMax = 12;
// Measured in seconds.
-const double kTextureUpdateTickRate = 0.004;
-
-// Measured in seconds.
const double kUploaderBusyTickRate = 0.001;
// Number of blocking update intervals to allow.
@@ -36,7 +33,8 @@ size_t ResourceUpdateController::MaxFullUpdatesPerTick(
ResourceProvider* resource_provider) {
double textures_per_second = resource_provider->EstimatedUploadsPerSecond();
size_t textures_per_tick =
- floor(kTextureUpdateTickRate * textures_per_second);
+ floor(resource_provider->TextureUpdateTickRate().InSecondsF() *
+ textures_per_second);
return textures_per_tick ? textures_per_tick : 1;
}
@@ -119,7 +117,7 @@ base::TimeTicks ResourceUpdateController::Now() const {
}
base::TimeDelta ResourceUpdateController::UpdateMoreTexturesTime() const {
- return base::TimeDelta::FromMilliseconds(kTextureUpdateTickRate * 1000);
+ return resource_provider_->TextureUpdateTickRate();
}
size_t ResourceUpdateController::UpdateMoreTexturesSize() const {