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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "core/page/Page.h" 51 #include "core/page/Page.h"
52 #include "core/page/PointerLockController.h" 52 #include "core/page/PointerLockController.h"
53 #include "platform/KeyboardCodes.h" 53 #include "platform/KeyboardCodes.h"
54 #include "platform/WebFrameScheduler.h" 54 #include "platform/WebFrameScheduler.h"
55 #include "platform/animation/CompositorAnimationHost.h" 55 #include "platform/animation/CompositorAnimationHost.h"
56 #include "platform/graphics/CompositorMutatorClient.h" 56 #include "platform/graphics/CompositorMutatorClient.h"
57 #include "public/web/WebAutofillClient.h" 57 #include "public/web/WebAutofillClient.h"
58 #include "public/web/WebPlugin.h" 58 #include "public/web/WebPlugin.h"
59 #include "public/web/WebRange.h" 59 #include "public/web/WebRange.h"
60 #include "public/web/WebWidgetClient.h" 60 #include "public/web/WebWidgetClient.h"
61 #include "web/AnimationWorkletProxyClientImpl.h"
61 #include "web/CompositionUnderlineVectorBuilder.h" 62 #include "web/CompositionUnderlineVectorBuilder.h"
62 #include "web/CompositorMutatorImpl.h" 63 #include "web/CompositorMutatorImpl.h"
63 #include "web/CompositorProxyClientImpl.h" 64 #include "web/CompositorWorkerProxyClientImpl.h"
64 #include "web/ContextMenuAllowedScope.h" 65 #include "web/ContextMenuAllowedScope.h"
65 #include "web/InspectorOverlay.h" 66 #include "web/InspectorOverlay.h"
66 #include "web/PageOverlay.h" 67 #include "web/PageOverlay.h"
67 #include "web/WebDevToolsAgentImpl.h" 68 #include "web/WebDevToolsAgentImpl.h"
68 #include "web/WebInputEventConversion.h" 69 #include "web/WebInputEventConversion.h"
69 #include "web/WebInputMethodControllerImpl.h" 70 #include "web/WebInputMethodControllerImpl.h"
70 #include "web/WebLocalFrameImpl.h" 71 #include "web/WebLocalFrameImpl.h"
71 #include "web/WebPluginContainerImpl.h" 72 #include "web/WebPluginContainerImpl.h"
72 #include "web/WebRemoteFrameImpl.h" 73 #include "web/WebRemoteFrameImpl.h"
73 #include "web/WebViewFrameWidget.h" 74 #include "web/WebViewFrameWidget.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 410
410 void WebFrameWidgetImpl::scheduleAnimation() { 411 void WebFrameWidgetImpl::scheduleAnimation() {
411 if (m_layerTreeView) { 412 if (m_layerTreeView) {
412 m_layerTreeView->setNeedsBeginFrame(); 413 m_layerTreeView->setNeedsBeginFrame();
413 return; 414 return;
414 } 415 }
415 if (m_client) 416 if (m_client)
416 m_client->scheduleAnimation(); 417 m_client->scheduleAnimation();
417 } 418 }
418 419
419 CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient() { 420 CompositorProxyClient* WebFrameWidgetImpl::createCompositorProxyClient(
421 CompositorProxyClient::Type type) {
420 if (!m_mutator) { 422 if (!m_mutator) {
421 std::unique_ptr<CompositorMutatorClient> mutatorClient = 423 std::unique_ptr<CompositorMutatorClient> mutatorClient =
422 CompositorMutatorImpl::createClient(); 424 CompositorMutatorImpl::createClient();
423 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator()); 425 m_mutator = static_cast<CompositorMutatorImpl*>(mutatorClient->mutator());
424 m_layerTreeView->setMutatorClient(std::move(mutatorClient)); 426 m_layerTreeView->setMutatorClient(std::move(mutatorClient));
425 } 427 }
426 return new CompositorProxyClientImpl(m_mutator); 428
429 switch (type) {
430 case CompositorProxyClient::kWorkerClient:
dcheng 2017/01/24 22:56:26 Internally, we can just share |m_mutator| initiali
431 return new CompositorWorkerProxyClientImpl(m_mutator);
432 case CompositorProxyClient::kWorkletClient:
433 return new AnimationWorkletProxyClientImpl(m_mutator);
434 }
435
436 NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type;
437 return nullptr;
427 } 438 }
428 439
429 void WebFrameWidgetImpl::applyViewportDeltas( 440 void WebFrameWidgetImpl::applyViewportDeltas(
430 const WebFloatSize& visualViewportDelta, 441 const WebFloatSize& visualViewportDelta,
431 const WebFloatSize& mainFrameDelta, 442 const WebFloatSize& mainFrameDelta,
432 const WebFloatSize& elasticOverscrollDelta, 443 const WebFloatSize& elasticOverscrollDelta,
433 float pageScaleDelta, 444 float pageScaleDelta,
434 float browserControlsDelta) { 445 float browserControlsDelta) {
435 // FIXME: To be implemented. 446 // FIXME: To be implemented.
436 } 447 }
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 return nullptr; 1143 return nullptr;
1133 } 1144 }
1134 1145
1135 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1146 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1136 if (!m_imeAcceptEvents) 1147 if (!m_imeAcceptEvents)
1137 return nullptr; 1148 return nullptr;
1138 return focusedLocalFrameInWidget(); 1149 return focusedLocalFrameInWidget();
1139 } 1150 }
1140 1151
1141 } // namespace blink 1152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698