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 CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
7 | 7 |
8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() override; | 36 scoped_refptr<SingleThreadIdleTaskRunner> IdleTaskRunner() override; |
37 scoped_refptr<base::SingleThreadTaskRunner> LoadingTaskRunner() override; | 37 scoped_refptr<base::SingleThreadTaskRunner> LoadingTaskRunner() override; |
38 void WillBeginFrame(const cc::BeginFrameArgs& args) override; | 38 void WillBeginFrame(const cc::BeginFrameArgs& args) override; |
39 void BeginFrameNotExpectedSoon() override; | 39 void BeginFrameNotExpectedSoon() override; |
40 void DidCommitFrameToCompositor() override; | 40 void DidCommitFrameToCompositor() override; |
41 void DidReceiveInputEventOnCompositorThread( | 41 void DidReceiveInputEventOnCompositorThread( |
42 const blink::WebInputEvent& web_input_event) override; | 42 const blink::WebInputEvent& web_input_event) override; |
43 void DidAnimateForInputOnCompositorThread() override; | 43 void DidAnimateForInputOnCompositorThread() override; |
44 bool IsHighPriorityWorkAnticipated() override; | 44 bool IsHighPriorityWorkAnticipated() override; |
45 bool ShouldYieldForHighPriorityWork() override; | 45 bool ShouldYieldForHighPriorityWork() override; |
| 46 void AddTaskObserver(base::MessageLoop::TaskObserver* task_observer) override; |
| 47 void RemoveTaskObserver( |
| 48 base::MessageLoop::TaskObserver* task_observer) override; |
46 void Shutdown() override; | 49 void Shutdown() override; |
47 | 50 |
48 void SetTimeSourceForTesting(scoped_refptr<cc::TestNowSource> time_source); | 51 void SetTimeSourceForTesting(scoped_refptr<cc::TestNowSource> time_source); |
| 52 void SetWorkBatchSizeForTesting(size_t work_batch_size); |
49 | 53 |
50 private: | 54 private: |
51 friend class RendererSchedulerImplTest; | 55 friend class RendererSchedulerImplTest; |
52 | 56 |
53 // Keep RendererSchedulerImpl::TaskQueueIdToString in sync with this enum. | 57 // Keep RendererSchedulerImpl::TaskQueueIdToString in sync with this enum. |
54 enum QueueId { | 58 enum QueueId { |
55 DEFAULT_TASK_QUEUE, | 59 DEFAULT_TASK_QUEUE, |
56 COMPOSITOR_TASK_QUEUE, | 60 COMPOSITOR_TASK_QUEUE, |
57 LOADING_TASK_QUEUE, | 61 LOADING_TASK_QUEUE, |
58 IDLE_TASK_QUEUE, | 62 IDLE_TASK_QUEUE, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 166 |
163 base::WeakPtr<RendererSchedulerImpl> weak_renderer_scheduler_ptr_; | 167 base::WeakPtr<RendererSchedulerImpl> weak_renderer_scheduler_ptr_; |
164 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; | 168 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; |
165 | 169 |
166 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); | 170 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); |
167 }; | 171 }; |
168 | 172 |
169 } // namespace content | 173 } // namespace content |
170 | 174 |
171 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ | 175 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_IMPL_H_ |
OLD | NEW |