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

Unified Diff: public/platform/WebSchedulerProxy.h

Issue 364873002: Introduce a basic Blink Scheduler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleaned up includes + build fix. Created 6 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 side-by-side diff with in-line comments
Download patch
« Source/platform/scheduler/Scheduler.cpp ('K') | « Source/web/WebKit.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebSchedulerProxy.h
diff --git a/public/platform/WebSchedulerProxy.h b/public/platform/WebSchedulerProxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..75968d429e1a52e41bfeb6854a448b77452ff271
--- /dev/null
+++ b/public/platform/WebSchedulerProxy.h
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebSchedulerProxy_h
+#define WebSchedulerProxy_h
+
+#include "WebThread.h"
+
+namespace WebCore {
+class Scheduler;
+}
+
+namespace blink {
+
+class WebSchedulerProxy {
+public:
+ BLINK_PLATFORM_EXPORT ~WebSchedulerProxy();
+
+ BLINK_PLATFORM_EXPORT static WebSchedulerProxy create();
+
+ // Schedule an input processing task to be run on the blink main thread.
+ // Takes ownership of |Task|. Can be called from any thread.
+ BLINK_PLATFORM_EXPORT void postInputTask(WebThread::Task*);
+
+ // Schedule a compositor task to run on the blink main thread. Takes
+ // ownership of |Task|. Can be called from any thread.
+ BLINK_PLATFORM_EXPORT void postCompositorTask(WebThread::Task*);
+
+private:
+ WebSchedulerProxy();
+
+ WebCore::Scheduler* m_scheduler;
+};
+
+} // namespace blink
+
+#endif // WebSchedulerProxy_h
« Source/platform/scheduler/Scheduler.cpp ('K') | « Source/web/WebKit.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698