| Index: Source/platform/exported/WebSchedulerProxy.cpp
|
| diff --git a/Source/platform/exported/WebTransformKeyframe.cpp b/Source/platform/exported/WebSchedulerProxy.cpp
|
| similarity index 64%
|
| copy from Source/platform/exported/WebTransformKeyframe.cpp
|
| copy to Source/platform/exported/WebSchedulerProxy.cpp
|
| index 8bf333f60cb2c142fd97847a31374b2f7470bce0..6d881c4dd2e94eb710db83d9d1e81eb45f201755 100644
|
| --- a/Source/platform/exported/WebTransformKeyframe.cpp
|
| +++ b/Source/platform/exported/WebSchedulerProxy.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,46 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "public/platform/WebTransformKeyframe.h"
|
|
|
| +#include "public/platform/WebSchedulerProxy.h"
|
| +
|
| +#include "platform/scheduler/Scheduler.h"
|
| +#include "wtf/Assertions.h"
|
| #include "wtf/PassOwnPtr.h"
|
|
|
| namespace blink {
|
| +namespace {
|
|
|
| -WebTransformKeyframe::WebTransformKeyframe(double time, PassOwnPtr<WebTransformOperations> value)
|
| - : m_time(time)
|
| - , m_value(value)
|
| +void runTask(PassOwnPtr<WebThread::Task> task)
|
| {
|
| + task->run();
|
| }
|
|
|
| -WebTransformKeyframe::~WebTransformKeyframe()
|
| +} // namespace
|
| +
|
| +WebSchedulerProxy WebSchedulerProxy::create()
|
| {
|
| - m_value.reset(0);
|
| + return WebSchedulerProxy();
|
| }
|
|
|
| -double WebTransformKeyframe::time() const
|
| +WebSchedulerProxy::WebSchedulerProxy()
|
| + : m_scheduler(WebCore::Scheduler::current())
|
| {
|
| - return m_time;
|
| + ASSERT(m_scheduler);
|
| }
|
|
|
| -const WebTransformOperations& WebTransformKeyframe::value() const
|
| +WebSchedulerProxy::~WebSchedulerProxy()
|
| {
|
| - return *m_value.get();
|
| }
|
|
|
| +void WebSchedulerProxy::postInputTask(WebThread::Task* task)
|
| +{
|
| + m_scheduler->postInputTask(bind(&runTask, adoptPtr(task)));
|
| +}
|
| +
|
| +void WebSchedulerProxy::postCompositorTask(WebThread::Task* task)
|
| +{
|
| + m_scheduler->postCompositorTask(bind(&runTask, adoptPtr(task)));
|
| +}
|
|
|
| } // namespace blink
|
|
|