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 THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ | 5 #ifndef THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ |
| 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ | 6 #define THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 | 77 |
| 78 // Returns a new RenderWidgetSchedulingState. The signals from this will be | 78 // Returns a new RenderWidgetSchedulingState. The signals from this will be |
| 79 // used to make scheduling decisions. | 79 // used to make scheduling decisions. |
| 80 virtual std::unique_ptr<RenderWidgetSchedulingState> | 80 virtual std::unique_ptr<RenderWidgetSchedulingState> |
| 81 NewRenderWidgetSchedulingState() = 0; | 81 NewRenderWidgetSchedulingState() = 0; |
| 82 | 82 |
| 83 // Called to notify about the start of an extended period where no frames | 83 // Called to notify about the start of an extended period where no frames |
| 84 // need to be drawn. Must be called from the main thread. | 84 // need to be drawn. Must be called from the main thread. |
| 85 virtual void BeginFrameNotExpectedSoon() = 0; | 85 virtual void BeginFrameNotExpectedSoon() = 0; |
| 86 | 86 |
| 87 // Called to notify about the start of a period where main frames are not | |
| 88 // scheduled and so short idle work can be scheduled. This will precede | |
| 89 // BeginFrameNotExpectedSoon and is also called when the compositor is busy | |
| 90 // but the main thread is not. | |
| 91 virtual void BeginMainFrameNotExpectedUntil(const base::TimeTicks& time) = 0; | |
|
Sami
2017/04/06 17:39:09
nit: pass by value
| |
| 92 | |
| 87 // Called to notify about the start of a new frame. Must be called from the | 93 // Called to notify about the start of a new frame. Must be called from the |
| 88 // main thread. | 94 // main thread. |
| 89 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; | 95 virtual void WillBeginFrame(const cc::BeginFrameArgs& args) = 0; |
| 90 | 96 |
| 91 // Called to notify that a previously begun frame was committed. Must be | 97 // Called to notify that a previously begun frame was committed. Must be |
| 92 // called from the main thread. | 98 // called from the main thread. |
| 93 virtual void DidCommitFrameToCompositor() = 0; | 99 virtual void DidCommitFrameToCompositor() = 0; |
| 94 | 100 |
| 95 // Keep RendererScheduler::InputEventStateToString in sync with this enum. | 101 // Keep RendererScheduler::InputEventStateToString in sync with this enum. |
| 96 enum class InputEventState { | 102 enum class InputEventState { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 | 201 |
| 196 protected: | 202 protected: |
| 197 RendererScheduler(); | 203 RendererScheduler(); |
| 198 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); | 204 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); |
| 199 }; | 205 }; |
| 200 | 206 |
| 201 } // namespace scheduler | 207 } // namespace scheduler |
| 202 } // namespace blink | 208 } // namespace blink |
| 203 | 209 |
| 204 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_ | 210 #endif // THIRD_PARTY_WEBKIT_PUBLIC_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_H_ |
| OLD | NEW |