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_H_ | 5 #ifndef CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ | 6 #define CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
7 | 7 |
8 #include "content/renderer/scheduler/single_thread_idle_task_runner.h" | 8 #include "content/renderer/scheduler/single_thread_idle_task_runner.h" |
9 #include "content/renderer/scheduler/task_queue_manager.h" | 9 #include "content/renderer/scheduler/task_queue_manager.h" |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; | 36 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; |
37 | 37 |
38 // Called to notify that a previously begun frame was committed. Must be | 38 // Called to notify that a previously begun frame was committed. Must be |
39 // called from the main thread. | 39 // called from the main thread. |
40 virtual void DidCommitFrameToCompositor() = 0; | 40 virtual void DidCommitFrameToCompositor() = 0; |
41 | 41 |
42 // Tells the scheduler that the system received an input event. Called by the | 42 // Tells the scheduler that the system received an input event. Called by the |
43 // compositor (impl) thread. | 43 // compositor (impl) thread. |
44 virtual void DidReceiveInputEventOnCompositorThread() = 0; | 44 virtual void DidReceiveInputEventOnCompositorThread() = 0; |
45 | 45 |
| 46 // Tells the scheduler that the system is displaying an input animation (e.g. |
| 47 // a fling). Called by the compositor (impl) thread. |
| 48 virtual void DidAnimateForInputOnCompositorThread() = 0; |
| 49 |
46 // Returns true if there is high priority work pending on the main thread | 50 // Returns true if there is high priority work pending on the main thread |
47 // and the caller should yield to let the scheduler service that work. | 51 // and the caller should yield to let the scheduler service that work. |
48 // Must be called from the main thread. | 52 // Must be called from the main thread. |
49 virtual bool ShouldYieldForHighPriorityWork() = 0; | 53 virtual bool ShouldYieldForHighPriorityWork() = 0; |
50 | 54 |
51 // Shuts down the scheduler by dropping any remaining pending work in the work | 55 // Shuts down the scheduler by dropping any remaining pending work in the work |
52 // queues. After this call any work posted to the task runners will be | 56 // queues. After this call any work posted to the task runners will be |
53 // silently dropped. | 57 // silently dropped. |
54 virtual void Shutdown() = 0; | 58 virtual void Shutdown() = 0; |
55 | 59 |
56 protected: | 60 protected: |
57 RendererScheduler(); | 61 RendererScheduler(); |
58 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 62 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
59 }; | 63 }; |
60 | 64 |
61 } // namespace content | 65 } // namespace content |
62 | 66 |
63 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ | 67 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
OLD | NEW |