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

Side by Side Diff: Source/platform/scheduler/Scheduler.h

Issue 554693004: Adds a didReceiveInputEvent api to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed an assert issue Created 6 years, 3 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
« no previous file with comments | « Source/platform/exported/WebSchedulerProxy.cpp ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Scheduler_h 5 #ifndef Scheduler_h
6 #define Scheduler_h 6 #define Scheduler_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/TraceLocation.h" 9 #include "platform/TraceLocation.h"
10 #include "wtf/DoubleBufferedDeque.h" 10 #include "wtf/DoubleBufferedDeque.h"
(...skipping 25 matching lines...) Expand all
36 // Called to notify that a previously begun frame was committed. 36 // Called to notify that a previously begun frame was committed.
37 void didCommitFrameToCompositor(); 37 void didCommitFrameToCompositor();
38 38
39 // The following entrypoints are used to schedule different types of tasks 39 // The following entrypoints are used to schedule different types of tasks
40 // to be run on the main thread. They can be called from any thread. 40 // to be run on the main thread. They can be called from any thread.
41 void postInputTask(const TraceLocation&, const Task&); 41 void postInputTask(const TraceLocation&, const Task&);
42 void postCompositorTask(const TraceLocation&, const Task&); 42 void postCompositorTask(const TraceLocation&, const Task&);
43 void postTask(const TraceLocation&, const Task&); // For generic (low priori ty) tasks. 43 void postTask(const TraceLocation&, const Task&); // For generic (low priori ty) tasks.
44 void postIdleTask(const TraceLocation&, const IdleTask&); // For non-critica l tasks which may be reordered relative to other task types. 44 void postIdleTask(const TraceLocation&, const IdleTask&); // For non-critica l tasks which may be reordered relative to other task types.
45 45
46 // Tells the scheduler that the system received an input event. This causes the scheduler to go into
47 // Compositor Priority mode for a short duration.
48 void didReceiveInputEvent();
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 // Can be called on any thread. 52 // Can be called on any thread.
49 bool shouldYieldForHighPriorityWork() const; 53 bool shouldYieldForHighPriorityWork() const;
50 54
51 // The shared timer can be used to schedule a periodic callback which may 55 // The shared timer can be used to schedule a periodic callback which may
52 // get preempted by higher priority work. 56 // get preempted by higher priority work.
53 void setSharedTimerFiredFunction(void (*function)()); 57 void setSharedTimerFiredFunction(void (*function)());
54 void setSharedTimerFireInterval(double); 58 void setSharedTimerFireInterval(double);
55 void stopSharedTimer(); 59 void stopSharedTimer();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 volatile int m_highPriorityTaskCount; 137 volatile int m_highPriorityTaskCount;
134 bool m_highPriorityTaskRunnerPosted; 138 bool m_highPriorityTaskRunnerPosted;
135 139
136 // Don't access m_schedulerPolicy directly, use enterSchedulerPolicyLocked a nd SchedulerPolicy instead. 140 // Don't access m_schedulerPolicy directly, use enterSchedulerPolicyLocked a nd SchedulerPolicy instead.
137 volatile int m_schedulerPolicy; 141 volatile int m_schedulerPolicy;
138 }; 142 };
139 143
140 } // namespace blink 144 } // namespace blink
141 145
142 #endif // Scheduler_h 146 #endif // Scheduler_h
OLDNEW
« no previous file with comments | « Source/platform/exported/WebSchedulerProxy.cpp ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698