Chromium Code Reviews| 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 "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 28 matching lines...) Expand all Loading... | |
| 39 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; | 39 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; |
| 40 | 40 |
| 41 // Called to notify that a previously begun frame was committed. Must be | 41 // Called to notify that a previously begun frame was committed. Must be |
| 42 // called from the main thread. | 42 // called from the main thread. |
| 43 virtual void DidCommitFrameToCompositor() = 0; | 43 virtual void DidCommitFrameToCompositor() = 0; |
| 44 | 44 |
| 45 // Tells the scheduler that the system received an input event. Can be called | 45 // Tells the scheduler that the system received an input event. Can be called |
| 46 // on any thread. | 46 // on any thread. |
| 47 virtual void DidReceiveInputEvent() = 0; | 47 virtual void DidReceiveInputEvent() = 0; |
| 48 | 48 |
| 49 // Tells the scheduler that the system is displaying an animation. E.g. a | |
| 50 // fling. | |
| 51 virtual void DidAnimate() = 0; | |
|
rmcilroy
2014/11/06 00:53:16
Is this called for all animations, or only input r
alex clarke (OOO till 29th)
2014/11/06 19:21:45
Done.
| |
| 52 | |
| 49 // Returns true if there is high priority work pending on the main thread | 53 // Returns true if there is high priority work pending on the main thread |
| 50 // and the caller should yield to let the scheduler service that work. | 54 // and the caller should yield to let the scheduler service that work. |
| 51 // Must be called from the main thread. | 55 // Must be called from the main thread. |
| 52 virtual bool ShouldYieldForHighPriorityWork() = 0; | 56 virtual bool ShouldYieldForHighPriorityWork() = 0; |
| 53 | 57 |
| 54 // Shuts down the scheduler by draining any remaining pending work in the work | 58 // Shuts down the scheduler by draining any remaining pending work in the work |
| 55 // queues. | 59 // queues. |
| 56 virtual void Shutdown() = 0; | 60 virtual void Shutdown() = 0; |
| 57 | 61 |
| 58 protected: | 62 protected: |
| 59 RendererScheduler(); | 63 RendererScheduler(); |
| 60 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 64 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 61 }; | 65 }; |
| 62 | 66 |
| 63 } // namespace content | 67 } // namespace content |
| 64 | 68 |
| 65 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ | 69 #endif // CONTENT_RENDERER_SCHEDULER_RENDERER_SCHEDULER_H_ |
| OLD | NEW |