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

Unified Diff: third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 7 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: third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp b/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
index dd0424c2c911f0a4890149aaddccb3154f564943..785f096b53c210fa47430bbbf0c614d36fad27c0 100644
--- a/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
+++ b/third_party/WebKit/Source/web/CompositorProxyClientImpl.cpp
@@ -7,18 +7,21 @@
#include "core/dom/CompositorProxy.h"
#include "modules/compositorworker/CompositorWorkerGlobalScope.h"
#include "platform/TraceEvent.h"
+#include "web/CompositorMutatorImpl.h"
#include "wtf/CurrentTime.h"
namespace blink {
-CompositorProxyClientImpl::CompositorProxyClientImpl()
- : m_globalScope(nullptr)
+CompositorProxyClientImpl::CompositorProxyClientImpl(CompositorMutatorImpl* mutator)
+ : m_mutator(mutator)
+ , m_globalScope(nullptr)
{
}
DEFINE_TRACE(CompositorProxyClientImpl)
{
CompositorProxyClient::trace(visitor);
+ visitor->trace(m_mutator);
visitor->trace(m_globalScope);
}
@@ -28,12 +31,14 @@ void CompositorProxyClientImpl::setGlobalScope(WorkerGlobalScope* scope)
DCHECK(!m_globalScope);
DCHECK(scope);
m_globalScope = static_cast<CompositorWorkerGlobalScope*>(scope);
+ m_mutator->registerProxyClient(this);
}
-void CompositorProxyClientImpl::runAnimationFrameCallbacks()
+void CompositorProxyClientImpl::requestAnimationFrame()
{
+ TRACE_EVENT0("compositor-worker", "CompositorProxyClientImpl::requestAnimationFrame");
m_requestedAnimationFrameCallbacks = true;
- mutate(monotonicallyIncreasingTime());
+ m_mutator->setNeedsMutate();
}
bool CompositorProxyClientImpl::mutate(double monotonicTimeNow)
« no previous file with comments | « third_party/WebKit/Source/web/CompositorProxyClientImpl.h ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698