| OLD | NEW |
| 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 "cc/resources/resource_update_controller.h" | 5 #include "cc/resources/resource_update_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "cc/resources/prioritized_resource.h" | 10 #include "cc/resources/prioritized_resource.h" |
| 11 #include "cc/resources/resource_provider.h" | 11 #include "cc/resources/resource_provider.h" |
| 12 #include "ui/gfx/frame_time.h" | |
| 13 | 12 |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 // Number of partial updates we allow. | 15 // Number of partial updates we allow. |
| 17 const size_t kPartialTextureUpdatesMax = 12; | 16 const size_t kPartialTextureUpdatesMax = 12; |
| 18 | 17 |
| 19 // Measured in seconds. | 18 // Measured in seconds. |
| 20 const double kUploaderBusyTickRate = 0.001; | 19 const double kUploaderBusyTickRate = 0.001; |
| 21 | 20 |
| 22 // Number of blocking update intervals to allow. | 21 // Number of blocking update intervals to allow. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (!uploads) | 154 if (!uploads) |
| 156 return; | 155 return; |
| 157 | 156 |
| 158 while (queue_->FullUploadSize() && uploads--) | 157 while (queue_->FullUploadSize() && uploads--) |
| 159 UpdateTexture(queue_->TakeFirstFullUpload()); | 158 UpdateTexture(queue_->TakeFirstFullUpload()); |
| 160 | 159 |
| 161 resource_provider_->FlushUploads(); | 160 resource_provider_->FlushUploads(); |
| 162 } | 161 } |
| 163 | 162 |
| 164 } // namespace cc | 163 } // namespace cc |
| OLD | NEW |