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

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: Fix a bunch of stuff Created 5 years, 9 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (m_webScheduler) 70 if (m_webScheduler)
71 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl eTask)); 71 m_webScheduler->postIdleTaskAfterWakeup(location, new IdleTaskRunner(idl eTask));
72 } 72 }
73 73
74 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas k* task) 74 void Scheduler::postLoadingTask(const WebTraceLocation& location, WebThread::Tas k* task)
75 { 75 {
76 if (m_webScheduler) 76 if (m_webScheduler)
77 m_webScheduler->postLoadingTask(location, task); 77 m_webScheduler->postLoadingTask(location, task);
78 } 78 }
79 79
80 void Scheduler::postTimerTask(const WebTraceLocation& location, WebThread::Task* task, long long delayMs)
81 {
82 if (m_webScheduler)
83 m_webScheduler->postTimerTask(location, task, delayMs);
84 }
85
80 bool Scheduler::shouldYieldForHighPriorityWork() const 86 bool Scheduler::shouldYieldForHighPriorityWork() const
81 { 87 {
82 if (m_webScheduler) 88 if (m_webScheduler)
83 return m_webScheduler->shouldYieldForHighPriorityWork(); 89 return m_webScheduler->shouldYieldForHighPriorityWork();
84 return false; 90 return false;
85 } 91 }
86 92
87 } // namespace blink 93 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698