Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: components/scheduler/renderer/renderer_scheduler.h

Issue 2023033003: scheduler: Throttle timers in out-of-view frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 5 #ifndef COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
6 #define COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 6 #define COMPONENTS_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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // TODO(alexclarke): Get rid of this default timer queue. 85 // TODO(alexclarke): Get rid of this default timer queue.
86 virtual scoped_refptr<TaskQueue> TimerTaskRunner() = 0; 86 virtual scoped_refptr<TaskQueue> TimerTaskRunner() = 0;
87 87
88 // Returns a new loading task runner. This queue is intended for tasks related 88 // Returns a new loading task runner. This queue is intended for tasks related
89 // to resource dispatch, foreground HTML parsing, etc... 89 // to resource dispatch, foreground HTML parsing, etc...
90 virtual scoped_refptr<TaskQueue> NewLoadingTaskRunner(const char* name) = 0; 90 virtual scoped_refptr<TaskQueue> NewLoadingTaskRunner(const char* name) = 0;
91 91
92 // Returns a new timer task runner. This queue is intended for DOM Timers. 92 // Returns a new timer task runner. This queue is intended for DOM Timers.
93 virtual scoped_refptr<TaskQueue> NewTimerTaskRunner(const char* name) = 0; 93 virtual scoped_refptr<TaskQueue> NewTimerTaskRunner(const char* name) = 0;
94 94
95 // Returns a task runner for tasks which don't fit into the above categories.
96 virtual scoped_refptr<TaskQueue> NewDefaultTaskRunner(const char* name) = 0;
97
95 // Returns a new RenderWidgetSchedulingState. The signals from this will be 98 // Returns a new RenderWidgetSchedulingState. The signals from this will be
96 // used to make scheduling decisions. 99 // used to make scheduling decisions.
97 virtual std::unique_ptr<RenderWidgetSchedulingState> 100 virtual std::unique_ptr<RenderWidgetSchedulingState>
98 NewRenderWidgetSchedulingState() = 0; 101 NewRenderWidgetSchedulingState() = 0;
99 102
100 // Called to notify about the start of an extended period where no frames 103 // Called to notify about the start of an extended period where no frames
101 // need to be drawn. Must be called from the main thread. 104 // need to be drawn. Must be called from the main thread.
102 virtual void BeginFrameNotExpectedSoon() = 0; 105 virtual void BeginFrameNotExpectedSoon() = 0;
103 106
104 // Called to notify about the start of a new frame. Must be called from the 107 // Called to notify about the start of a new frame. Must be called from the
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 base::trace_event::BlameContext* blame_context) = 0; 195 base::trace_event::BlameContext* blame_context) = 0;
193 196
194 protected: 197 protected:
195 RendererScheduler(); 198 RendererScheduler();
196 DISALLOW_COPY_AND_ASSIGN(RendererScheduler); 199 DISALLOW_COPY_AND_ASSIGN(RendererScheduler);
197 }; 200 };
198 201
199 } // namespace scheduler 202 } // namespace scheduler
200 203
201 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_ 204 #endif // COMPONENTS_SCHEDULER_RENDERER_RENDERER_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698