| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/scheduler/renderer_scheduler_impl.h" | 5 #include "content/renderer/scheduler/renderer_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "base/trace_event/trace_event_argument.h" | 10 #include "base/trace_event/trace_event_argument.h" |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 if (SchedulerPolicy() == Policy::TOUCHSTART_PRIORITY) { | 479 if (SchedulerPolicy() == Policy::TOUCHSTART_PRIORITY) { |
| 480 // Don't start a long idle task in touch start priority, try again when | 480 // Don't start a long idle task in touch start priority, try again when |
| 481 // the policy is scheduled to end. | 481 // the policy is scheduled to end. |
| 482 *next_long_idle_period_delay_out = current_policy_expiration_time_ - now; | 482 *next_long_idle_period_delay_out = current_policy_expiration_time_ - now; |
| 483 return false; | 483 return false; |
| 484 } | 484 } |
| 485 return true; | 485 return true; |
| 486 } | 486 } |
| 487 | 487 |
| 488 void RendererSchedulerImpl::SetTimeSourceForTesting( | 488 void RendererSchedulerImpl::SetTimeSourceForTesting( |
| 489 scoped_refptr<cc::TestNowSource> time_source) { | 489 scoped_ptr<TimeSource> time_source) { |
| 490 helper_.SetTimeSourceForTesting(time_source); | 490 helper_.SetTimeSourceForTesting(time_source.Pass()); |
| 491 } | 491 } |
| 492 | 492 |
| 493 void RendererSchedulerImpl::SetWorkBatchSizeForTesting(size_t work_batch_size) { | 493 void RendererSchedulerImpl::SetWorkBatchSizeForTesting(size_t work_batch_size) { |
| 494 helper_.SetWorkBatchSizeForTesting(work_batch_size); | 494 helper_.SetWorkBatchSizeForTesting(work_batch_size); |
| 495 } | 495 } |
| 496 | 496 |
| 497 RendererSchedulerImpl::PollableNeedsUpdateFlag::PollableNeedsUpdateFlag( | 497 RendererSchedulerImpl::PollableNeedsUpdateFlag::PollableNeedsUpdateFlag( |
| 498 base::Lock* write_lock_) | 498 base::Lock* write_lock_) |
| 499 : flag_(false), write_lock_(write_lock_) { | 499 : flag_(false), write_lock_(write_lock_) { |
| 500 } | 500 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 // meaningful touchstart response and should not impact task priority. | 633 // meaningful touchstart response and should not impact task priority. |
| 634 return current_state; | 634 return current_state; |
| 635 | 635 |
| 636 default: | 636 default: |
| 637 break; | 637 break; |
| 638 } | 638 } |
| 639 return InputStreamState::ACTIVE; | 639 return InputStreamState::ACTIVE; |
| 640 } | 640 } |
| 641 | 641 |
| 642 } // namespace content | 642 } // namespace content |
| OLD | NEW |