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

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

Issue 956333002: Refactor TimeBase to post tasks. Workers to use real Idle tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplify now the quiescence is handled in chromium Created 5 years, 8 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 #include "config.h" 5 #include "config.h"
6 #include "platform/scheduler/Scheduler.h" 6 #include "platform/scheduler/Scheduler.h"
7 7
8 #include "public/platform/Platform.h" 8 #include "public/platform/Platform.h"
9 #include "public/platform/WebScheduler.h" 9 #include "public/platform/WebScheduler.h"
10 #include "public/platform/WebTraceLocation.h" 10 #include "public/platform/WebTraceLocation.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 if (m_webScheduler) 79 if (m_webScheduler)
80 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl eTask)); 80 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl eTask));
81 } 81 }
82 82
83 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas k* task) 83 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas k* task)
84 { 84 {
85 if (m_webScheduler) 85 if (m_webScheduler)
86 m_webScheduler->postLoadingTask(location, task); 86 m_webScheduler->postLoadingTask(location, task);
87 } 87 }
88 88
89 void Scheduler::postTimerTask(const WebTraceLocation& location, WebThread::Task* task, long long delayMs)
90 {
91 if (m_webScheduler)
92 m_webScheduler->postTimerTask(location, task, delayMs);
93 }
94
89 bool Scheduler::shouldYieldForHighPriorityWork() const 95 bool Scheduler::shouldYieldForHighPriorityWork() const
90 { 96 {
91 if (m_webScheduler) 97 if (m_webScheduler)
92 return m_webScheduler->shouldYieldForHighPriorityWork(); 98 return m_webScheduler->shouldYieldForHighPriorityWork();
93 return false; 99 return false;
94 } 100 }
95 101
96 bool Scheduler::canExceedIdleDeadlineIfRequired() const 102 bool Scheduler::canExceedIdleDeadlineIfRequired() const
97 { 103 {
98 if (m_webScheduler) 104 if (m_webScheduler)
99 return m_webScheduler->canExceedIdleDeadlineIfRequired(); 105 return m_webScheduler->canExceedIdleDeadlineIfRequired();
100 return false; 106 return false;
101 } 107 }
102 108
103 } // namespace blink 109 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698