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

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

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: Export CompositorAnimator Created 3 years, 11 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/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index 4f686427e736d2b74b9d810e5e813d769d90a867..b64e2d5fbe631ce690750ce80ede82282f9fe71b 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -58,9 +58,10 @@
#include "public/web/WebPlugin.h"
#include "public/web/WebRange.h"
#include "public/web/WebWidgetClient.h"
+#include "web/AnimationWorkletProxyClientImpl.h"
#include "web/CompositionUnderlineVectorBuilder.h"
#include "web/CompositorMutatorImpl.h"
-#include "web/CompositorProxyClientImpl.h"
+#include "web/CompositorWorkerProxyClientImpl.h"
#include "web/ContextMenuAllowedScope.h"
#include "web/InspectorOverlay.h"
#include "web/PageOverlay.h"
@@ -416,14 +417,24 @@ void WebFrameWidgetImpl::scheduleAnimation() {
m_client->scheduleAnimation();
}
-CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient() {
+CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient(
+ CompositorProxyClient::Type type) {
if (!m_mutator) {
std::unique_ptr<CompositorMutatorClient> mutatorClient =
CompositorMutatorImpl::createClient();
m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator());
m_layerTreeView->setMutatorClient(std::move(mutatorClient));
}
- return new CompositorProxyClientImpl(m_mutator);
+
+ switch (type) {
+ case CompositorProxyClient::kWorkerClient:
dcheng 2017/01/24 22:56:26 Internally, we can just share |m_mutator| initiali
+ return new CompositorWorkerProxyClientImpl(m_mutator);
+ case CompositorProxyClient::kWorkletClient:
+ return new AnimationWorkletProxyClientImpl(m_mutator);
+ }
+
+ NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type;
+ return nullptr;
}
void WebFrameWidgetImpl::applyViewportDeltas(

Powered by Google App Engine
This is Rietveld 408576698