Chromium Code Reviews| 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 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 return is_enabled == other.is_enabled && priority == other.priority && | 148 return is_enabled == other.is_enabled && priority == other.priority && |
| 149 time_domain_type == other.time_domain_type; | 149 time_domain_type == other.time_domain_type; |
| 150 } | 150 } |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 struct Policy { | 153 struct Policy { |
| 154 TaskQueuePolicy compositor_queue_policy; | 154 TaskQueuePolicy compositor_queue_policy; |
| 155 TaskQueuePolicy loading_queue_policy; | 155 TaskQueuePolicy loading_queue_policy; |
| 156 TaskQueuePolicy timer_queue_policy; | 156 TaskQueuePolicy timer_queue_policy; |
| 157 TaskQueuePolicy default_queue_policy; | 157 TaskQueuePolicy default_queue_policy; |
| 158 TaskQueuePolicy control_queue_policy; | |
| 158 | 159 |
| 159 bool operator==(const Policy& other) const { | 160 bool operator==(const Policy& other) const { |
| 160 return compositor_queue_policy == other.compositor_queue_policy && | 161 return compositor_queue_policy == other.compositor_queue_policy && |
| 161 loading_queue_policy == other.loading_queue_policy && | 162 loading_queue_policy == other.loading_queue_policy && |
| 162 timer_queue_policy == other.timer_queue_policy && | 163 timer_queue_policy == other.timer_queue_policy && |
| 163 default_queue_policy == other.default_queue_policy; | 164 default_queue_policy == other.default_queue_policy && |
| 165 control_queue_policy == other.control_queue_policy; | |
| 164 } | 166 } |
| 165 }; | 167 }; |
| 166 | 168 |
| 167 class PollableNeedsUpdateFlag { | 169 class PollableNeedsUpdateFlag { |
| 168 public: | 170 public: |
| 169 PollableNeedsUpdateFlag(base::Lock* write_lock); | 171 PollableNeedsUpdateFlag(base::Lock* write_lock); |
| 170 ~PollableNeedsUpdateFlag(); | 172 ~PollableNeedsUpdateFlag(); |
| 171 | 173 |
| 172 // Set the flag. May only be called if |write_lock| is held. | 174 // Set the flag. May only be called if |write_lock| is held. |
| 173 void SetWhileLocked(bool value); | 175 void SetWhileLocked(bool value); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 base::TimeTicks estimated_next_frame_begin; | 331 base::TimeTicks estimated_next_frame_begin; |
| 330 base::TimeDelta compositor_frame_interval; | 332 base::TimeDelta compositor_frame_interval; |
| 331 base::TimeDelta longest_jank_free_task_duration; | 333 base::TimeDelta longest_jank_free_task_duration; |
| 332 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero. | 334 int timer_queue_suspend_count; // TIMER_TASK_QUEUE suspended if non-zero. |
| 333 int navigation_task_expected_count; | 335 int navigation_task_expected_count; |
| 334 ExpensiveTaskPolicy expensive_task_policy; | 336 ExpensiveTaskPolicy expensive_task_policy; |
| 335 bool renderer_hidden; | 337 bool renderer_hidden; |
| 336 bool renderer_backgrounded; | 338 bool renderer_backgrounded; |
| 337 bool timer_queue_suspension_when_backgrounded_enabled; | 339 bool timer_queue_suspension_when_backgrounded_enabled; |
| 338 bool timer_queue_suspended_when_backgrounded; | 340 bool timer_queue_suspended_when_backgrounded; |
| 341 bool queue_suspended; | |
|
Sami
2016/05/27 14:08:57
Maybe renderer_suspended would be a more descripti
hajimehoshi
2016/05/31 08:09:01
Done.
| |
| 339 bool was_shutdown; | 342 bool was_shutdown; |
| 340 bool loading_tasks_seem_expensive; | 343 bool loading_tasks_seem_expensive; |
| 341 bool timer_tasks_seem_expensive; | 344 bool timer_tasks_seem_expensive; |
| 342 bool touchstart_expected_soon; | 345 bool touchstart_expected_soon; |
| 343 bool have_seen_a_begin_main_frame; | 346 bool have_seen_a_begin_main_frame; |
| 344 bool have_reported_blocking_intervention_in_current_policy; | 347 bool have_reported_blocking_intervention_in_current_policy; |
| 345 bool have_reported_blocking_intervention_since_navigation; | 348 bool have_reported_blocking_intervention_since_navigation; |
| 346 bool has_visible_render_widget_with_touch_handler; | 349 bool has_visible_render_widget_with_touch_handler; |
| 347 bool begin_frame_not_expected_soon; | 350 bool begin_frame_not_expected_soon; |
| 348 bool expensive_task_blocking_allowed; | 351 bool expensive_task_blocking_allowed; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 | 419 |
| 417 PollableThreadSafeFlag policy_may_need_update_; | 420 PollableThreadSafeFlag policy_may_need_update_; |
| 418 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 421 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 419 | 422 |
| 420 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 423 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 421 }; | 424 }; |
| 422 | 425 |
| 423 } // namespace scheduler | 426 } // namespace scheduler |
| 424 | 427 |
| 425 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ | 428 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_IMPL_H_ |
| OLD | NEW |