| 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 "platform/scheduler/renderer/renderer_scheduler_impl.h" | 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 case UseCase::TOUCHSTART: | 1082 case UseCase::TOUCHSTART: |
| 1083 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; | 1083 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; |
| 1084 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY; | 1084 new_policy.compositor_queue_policy.priority = TaskQueue::HIGH_PRIORITY; |
| 1085 new_policy.loading_queue_policy.is_enabled = false; | 1085 new_policy.loading_queue_policy.is_enabled = false; |
| 1086 new_policy.timer_queue_policy.is_enabled = false; | 1086 new_policy.timer_queue_policy.is_enabled = false; |
| 1087 // NOTE this is a nop due to the above. | 1087 // NOTE this is a nop due to the above. |
| 1088 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; | 1088 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; |
| 1089 break; | 1089 break; |
| 1090 | 1090 |
| 1091 case UseCase::NONE: | 1091 case UseCase::NONE: |
| 1092 new_policy.compositor_queue_policy.priority = | |
| 1093 main_thread_compositing_is_fast ? TaskQueue::HIGH_PRIORITY | |
| 1094 : TaskQueue::NORMAL_PRIORITY; | |
| 1095 | |
| 1096 // It's only safe to block tasks that if we are expecting a compositor | 1092 // It's only safe to block tasks that if we are expecting a compositor |
| 1097 // driven gesture. | 1093 // driven gesture. |
| 1098 if (touchstart_expected_soon && | 1094 if (touchstart_expected_soon && |
| 1099 GetAnyThread().last_gesture_was_compositor_driven) { | 1095 GetAnyThread().last_gesture_was_compositor_driven) { |
| 1100 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; | 1096 new_policy.rail_mode = v8::PERFORMANCE_RESPONSE; |
| 1101 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; | 1097 expensive_task_policy = ExpensiveTaskPolicy::BLOCK; |
| 1102 } | 1098 } |
| 1103 break; | 1099 break; |
| 1104 | 1100 |
| 1105 case UseCase::LOADING: | 1101 case UseCase::LOADING: |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2054 case TimeDomainType::VIRTUAL: | 2050 case TimeDomainType::VIRTUAL: |
| 2055 return "virtual"; | 2051 return "virtual"; |
| 2056 default: | 2052 default: |
| 2057 NOTREACHED(); | 2053 NOTREACHED(); |
| 2058 return nullptr; | 2054 return nullptr; |
| 2059 } | 2055 } |
| 2060 } | 2056 } |
| 2061 | 2057 |
| 2062 } // namespace scheduler | 2058 } // namespace scheduler |
| 2063 } // namespace blink | 2059 } // namespace blink |
| OLD | NEW |