| 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 THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER
_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 TaskQueue* task_queue, | 372 TaskQueue* task_queue, |
| 373 TaskQueue::QueueEnabledVoter* task_queue_enabled_voter, | 373 TaskQueue::QueueEnabledVoter* task_queue_enabled_voter, |
| 374 const TaskQueuePolicy& old_task_queue_policy, | 374 const TaskQueuePolicy& old_task_queue_policy, |
| 375 const TaskQueuePolicy& new_task_queue_policy) const; | 375 const TaskQueuePolicy& new_task_queue_policy) const; |
| 376 | 376 |
| 377 static const char* ExpensiveTaskPolicyToString( | 377 static const char* ExpensiveTaskPolicyToString( |
| 378 ExpensiveTaskPolicy expensive_task_policy); | 378 ExpensiveTaskPolicy expensive_task_policy); |
| 379 | 379 |
| 380 bool ShouldDisableThrottlingBecauseOfAudio(base::TimeTicks now); | 380 bool ShouldDisableThrottlingBecauseOfAudio(base::TimeTicks now); |
| 381 | 381 |
| 382 void RecordTaskMetrics(TaskQueue::QueueType queue_type, |
| 383 base::TimeDelta duration); |
| 384 |
| 382 SchedulerHelper helper_; | 385 SchedulerHelper helper_; |
| 383 IdleHelper idle_helper_; | 386 IdleHelper idle_helper_; |
| 384 IdleCanceledDelayedTaskSweeper idle_canceled_delayed_task_sweeper_; | 387 IdleCanceledDelayedTaskSweeper idle_canceled_delayed_task_sweeper_; |
| 385 std::unique_ptr<TaskQueueThrottler> task_queue_throttler_; | 388 std::unique_ptr<TaskQueueThrottler> task_queue_throttler_; |
| 386 RenderWidgetSignals render_widget_scheduler_signals_; | 389 RenderWidgetSignals render_widget_scheduler_signals_; |
| 387 | 390 |
| 388 const scoped_refptr<TaskQueue> control_task_runner_; | 391 const scoped_refptr<TaskQueue> control_task_runner_; |
| 389 const scoped_refptr<TaskQueue> compositor_task_runner_; | 392 const scoped_refptr<TaskQueue> compositor_task_runner_; |
| 390 std::unique_ptr<TaskQueue::QueueEnabledVoter> | 393 std::unique_ptr<TaskQueue::QueueEnabledVoter> |
| 391 compositor_task_runner_enabled_voter_; | 394 compositor_task_runner_enabled_voter_; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 bool have_seen_a_begin_main_frame; | 454 bool have_seen_a_begin_main_frame; |
| 452 bool have_reported_blocking_intervention_in_current_policy; | 455 bool have_reported_blocking_intervention_in_current_policy; |
| 453 bool have_reported_blocking_intervention_since_navigation; | 456 bool have_reported_blocking_intervention_since_navigation; |
| 454 bool has_visible_render_widget_with_touch_handler; | 457 bool has_visible_render_widget_with_touch_handler; |
| 455 bool begin_frame_not_expected_soon; | 458 bool begin_frame_not_expected_soon; |
| 456 bool in_idle_period_for_testing; | 459 bool in_idle_period_for_testing; |
| 457 bool use_virtual_time; | 460 bool use_virtual_time; |
| 458 bool is_audio_playing; | 461 bool is_audio_playing; |
| 459 std::set<WebViewSchedulerImpl*> web_view_schedulers; // Not owned. | 462 std::set<WebViewSchedulerImpl*> web_view_schedulers; // Not owned. |
| 460 RAILModeObserver* rail_mode_observer; // Not owned. | 463 RAILModeObserver* rail_mode_observer; // Not owned. |
| 464 std::array<base::TimeDelta, |
| 465 static_cast<size_t>(TaskQueue::QueueType::COUNT)> |
| 466 task_duration_per_queue_type; |
| 461 }; | 467 }; |
| 462 | 468 |
| 463 struct AnyThread { | 469 struct AnyThread { |
| 464 AnyThread(); | 470 AnyThread(); |
| 465 ~AnyThread(); | 471 ~AnyThread(); |
| 466 | 472 |
| 467 base::TimeTicks last_idle_period_end_time; | 473 base::TimeTicks last_idle_period_end_time; |
| 468 base::TimeTicks fling_compositor_escalation_deadline; | 474 base::TimeTicks fling_compositor_escalation_deadline; |
| 469 UserModel user_model; | 475 UserModel user_model; |
| 470 bool awaiting_touch_start_response; | 476 bool awaiting_touch_start_response; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 | 536 |
| 531 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 537 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
| 532 | 538 |
| 533 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 539 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
| 534 }; | 540 }; |
| 535 | 541 |
| 536 } // namespace scheduler | 542 } // namespace scheduler |
| 537 } // namespace blink | 543 } // namespace blink |
| 538 | 544 |
| 539 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_IMPL_H_ | 545 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU
LER_IMPL_H_ |
| OLD | NEW |