Chromium Code Reviews| Index: cc/resources/pixel_buffer_raster_worker_pool.cc |
| diff --git a/cc/resources/pixel_buffer_raster_worker_pool.cc b/cc/resources/pixel_buffer_raster_worker_pool.cc |
| index d7554736942a66ee541c065c99320385c42d0234..f980195fb3bc318d5c6de7df8f6465cf2dcd2230 100644 |
| --- a/cc/resources/pixel_buffer_raster_worker_pool.cc |
| +++ b/cc/resources/pixel_buffer_raster_worker_pool.cc |
| @@ -515,10 +515,13 @@ void PixelBufferRasterWorkerPool::ScheduleMoreTasks() { |
| continue; |
| } |
| - // All raster tasks need to be throttled by bytes of pending uploads. |
| + // All raster tasks need to be throttled by bytes of pending uploads, |
| + // but if it's the first task allow it to complete no matter what its size, |
|
reveman
2014/08/21 01:15:47
nit: maybe "only" instead of "first" as this is ef
enne (OOO)
2014/08/21 01:34:15
Done.
|
| + // to prevent starvation of the task queue. |
| size_t new_bytes_pending_upload = bytes_pending_upload; |
| new_bytes_pending_upload += task->resource()->bytes(); |
| - if (new_bytes_pending_upload > max_bytes_pending_upload_) { |
| + if (new_bytes_pending_upload > max_bytes_pending_upload_ && |
| + bytes_pending_upload > 0) { |
|
reveman
2014/08/21 01:15:47
nit: s/bytes_pending_upload > 0/bytes_pending_uplo
enne (OOO)
2014/08/21 01:34:15
Done.
|
| did_throttle_raster_tasks = true; |
| if (item.required_for_activation) |
| did_throttle_raster_tasks_required_for_activation = true; |