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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.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/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 00c8ca2d67c0f489f10c7ad4862100d0f336bb41..7378b3d349abf57907fa7af6964f47cac57ddc63 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -149,9 +149,10 @@
#include "public/web/WebSelection.h"
#include "public/web/WebViewClient.h"
#include "public/web/WebWindowFeatures.h"
+#include "web/AnimationWorkletProxyClientImpl.h"
#include "web/CompositionUnderlineVectorBuilder.h"
#include "web/CompositorMutatorImpl.h"
-#include "web/CompositorProxyClientImpl.h"
+#include "web/CompositorWorkerProxyClientImpl.h"
#include "web/ContextFeaturesClientImpl.h"
#include "web/ContextMenuAllowedScope.h"
#include "web/DatabaseClientImpl.h"
@@ -4153,14 +4154,24 @@ void WebViewImpl::forceNextDrawingBufferCreationToFail() {
DrawingBuffer::forceNextDrawingBufferCreationToFail();
}
-CompositorProxyClient* WebViewImpl::createCompositorProxyClient() {
+CompositorProxyClient* WebViewImpl::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:
+ return new CompositorWorkerProxyClientImpl(m_mutator);
+ case CompositorProxyClient::kWorkletClient:
+ return new AnimationWorkletProxyClientImpl(m_mutator);
+ }
+
+ NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type;
+ return nullptr;
}
void WebViewImpl::updatePageOverlays() {

Powered by Google App Engine
This is Rietveld 408576698