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

Unified Diff: Source/platform/exported/WebScheduler.cpp

Issue 364873002: Introduce a basic Blink Scheduler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. 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
Index: Source/platform/exported/WebScheduler.cpp
diff --git a/Source/platform/exported/WebTransformKeyframe.cpp b/Source/platform/exported/WebScheduler.cpp
similarity index 62%
copy from Source/platform/exported/WebTransformKeyframe.cpp
copy to Source/platform/exported/WebScheduler.cpp
index 8bf333f60cb2c142fd97847a31374b2f7470bce0..dbad5983aeb7ec5b60a4d8f5621dab251ab7bab6 100644
--- a/Source/platform/exported/WebTransformKeyframe.cpp
+++ b/Source/platform/exported/WebScheduler.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,32 +23,47 @@
*/
#include "config.h"
-#include "public/platform/WebTransformKeyframe.h"
-#include "wtf/PassOwnPtr.h"
+#include "public/platform/WebScheduler.h"
+
+#include "platform/scheduler/Scheduler.h"
+#include "wtf/Assertions.h"
namespace blink {
-WebTransformKeyframe::WebTransformKeyframe(double time, PassOwnPtr<WebTransformOperations> value)
- : m_time(time)
- , m_value(value)
+WebScheduler WebScheduler::create()
{
+ return WebScheduler();
}
-WebTransformKeyframe::~WebTransformKeyframe()
+WebScheduler::WebScheduler()
+ : m_scheduler(WebCore::Scheduler::current())
{
- m_value.reset(0);
+ ASSERT(m_scheduler);
}
-double WebTransformKeyframe::time() const
+WebScheduler::~WebScheduler()
{
- return m_time;
}
-const WebTransformOperations& WebTransformKeyframe::value() const
+void WebScheduler::postTask(WebThread::Task* task)
{
- return *m_value.get();
+ m_scheduler->postTask(task);
}
+void WebScheduler::postInputTask(WebThread::Task* task)
+{
+ m_scheduler->postInputTask(task);
+}
+
+void WebScheduler::postCompositorTask(WebThread::Task* task)
+{
+ m_scheduler->postCompositorTask(task);
+}
+
+void WebScheduler::postBeginFrameTask(WebThread::Task* task, double frameTime, double deadline, double interval)
+{
+ m_scheduler->postBeginFrameTask(task, frameTime, deadline, interval);
+}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698