| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BASE_TASK_QUEUE_IMPL_H_ | 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
| 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 base::Optional<base::TimeTicks> GetNextScheduledWakeUp() override; | 127 base::Optional<base::TimeTicks> GetNextScheduledWakeUp() override; |
| 128 void SetQueuePriority(QueuePriority priority) override; | 128 void SetQueuePriority(QueuePriority priority) override; |
| 129 QueuePriority GetQueuePriority() const override; | 129 QueuePriority GetQueuePriority() const override; |
| 130 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; | 130 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; |
| 131 void RemoveTaskObserver( | 131 void RemoveTaskObserver( |
| 132 base::MessageLoop::TaskObserver* task_observer) override; | 132 base::MessageLoop::TaskObserver* task_observer) override; |
| 133 void SetTimeDomain(TimeDomain* time_domain) override; | 133 void SetTimeDomain(TimeDomain* time_domain) override; |
| 134 TimeDomain* GetTimeDomain() const override; | 134 TimeDomain* GetTimeDomain() const override; |
| 135 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; | 135 void SetBlameContext(base::trace_event::BlameContext* blame_context) override; |
| 136 void InsertFence() override; | 136 void InsertFence() override; |
| 137 void BlockByFence() override; |
| 137 void RemoveFence() override; | 138 void RemoveFence() override; |
| 138 bool BlockedByFence() const override; | 139 bool BlockedByFence() const override; |
| 139 | 140 |
| 140 // If this returns false then future updates for this queue are not needed | 141 // If this returns false then future updates for this queue are not needed |
| 141 // unless requested. | 142 // unless requested. |
| 142 bool MaybeUpdateImmediateWorkQueues(); | 143 bool MaybeUpdateImmediateWorkQueues(); |
| 143 | 144 |
| 144 const char* GetName() const override; | 145 const char* GetName() const override; |
| 145 QueueType GetQueueType() const override; | 146 QueueType GetQueueType() const override; |
| 146 | 147 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 main_thread_only().scheduled_time_domain_wakeup = | 187 main_thread_only().scheduled_time_domain_wakeup = |
| 187 scheduled_time_domain_wakeup; | 188 scheduled_time_domain_wakeup; |
| 188 } | 189 } |
| 189 | 190 |
| 190 HeapHandle heap_handle() const { return main_thread_only().heap_handle; } | 191 HeapHandle heap_handle() const { return main_thread_only().heap_handle; } |
| 191 | 192 |
| 192 void set_heap_handle(HeapHandle heap_handle) { | 193 void set_heap_handle(HeapHandle heap_handle) { |
| 193 main_thread_only().heap_handle = heap_handle; | 194 main_thread_only().heap_handle = heap_handle; |
| 194 } | 195 } |
| 195 | 196 |
| 197 // Returns true if queue is enabled and is not blocked by fence. |
| 198 // Test-only and main-thread-only. |
| 199 bool IsQueueUnblockedForTest() const; |
| 200 |
| 196 private: | 201 private: |
| 197 friend class WorkQueue; | 202 friend class WorkQueue; |
| 198 friend class WorkQueueTest; | 203 friend class WorkQueueTest; |
| 199 | 204 |
| 200 enum class TaskType { | 205 enum class TaskType { |
| 201 NORMAL, | 206 NORMAL, |
| 202 NON_NESTABLE, | 207 NON_NESTABLE, |
| 203 }; | 208 }; |
| 204 | 209 |
| 205 struct AnyThread { | 210 struct AnyThread { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 const bool should_report_when_execution_blocked_; | 321 const bool should_report_when_execution_blocked_; |
| 317 | 322 |
| 318 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); | 323 DISALLOW_COPY_AND_ASSIGN(TaskQueueImpl); |
| 319 }; | 324 }; |
| 320 | 325 |
| 321 } // namespace internal | 326 } // namespace internal |
| 322 } // namespace scheduler | 327 } // namespace scheduler |
| 323 } // namespace blink | 328 } // namespace blink |
| 324 | 329 |
| 325 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ | 330 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_BASE_TASK_QUEUE_IMPL_H_ |
| OLD | NEW |