| 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 704d4cdeb4fc8b6cad73bced9cc75043da3d9c8a..d9155bfc5fcc0308735e8b53ce44420c19d2f8d7 100644
|
| --- a/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "core/HTMLNames.h"
|
| #include "core/InputTypeNames.h"
|
| #include "core/clipboard/DataObject.h"
|
| +#include "core/dom/DOMNodeIds.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/Fullscreen.h"
|
| #include "core/dom/LayoutTreeBuilderTraversal.h"
|
| @@ -92,6 +93,7 @@
|
| #include "core/timing/Performance.h"
|
| #include "modules/accessibility/AXObject.h"
|
| #include "modules/accessibility/AXObjectCacheImpl.h"
|
| +#include "modules/compositorworker/CompositorWorker.h"
|
| #include "modules/credentialmanager/CredentialManagerClient.h"
|
| #include "modules/encryptedmedia/MediaKeysController.h"
|
| #include "modules/storage/StorageNamespaceController.h"
|
| @@ -111,6 +113,8 @@
|
| #include "platform/exported/WebActiveGestureAnimation.h"
|
| #include "platform/fonts/FontCache.h"
|
| #include "platform/graphics/Color.h"
|
| +#include "platform/graphics/CompositorMutation.h"
|
| +#include "platform/graphics/CompositorMutatorClient.h"
|
| #include "platform/graphics/FirstPaintInvalidationTracking.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
| #include "platform/graphics/Image.h"
|
| @@ -149,6 +153,7 @@
|
| #include "public/web/WebViewClient.h"
|
| #include "public/web/WebWindowFeatures.h"
|
| #include "web/CompositionUnderlineVectorBuilder.h"
|
| +#include "web/CompositorMutatorImpl.h"
|
| #include "web/ContextFeaturesClientImpl.h"
|
| #include "web/ContextMenuAllowedScope.h"
|
| #include "web/DatabaseClientImpl.h"
|
| @@ -4438,6 +4443,19 @@ void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t
|
| }
|
| }
|
|
|
| +void WebViewImpl::applyMutations(const WebCompositorMutations& mutations)
|
| +{
|
| + TRACE_EVENT0("compositor-worker", "WebViewImpl::applyMutations");
|
| + for (const auto& pair : static_cast<const CompositorMutations&>(mutations).map) {
|
| + int elementId = pair.first;
|
| + const CompositorMutation& mutation = pair.second;
|
| + Node* node = DOMNodeIds::nodeForId(elementId);
|
| + if (!node || !toElement(node))
|
| + continue;
|
| + toElement(node)->updateFromMutation(mutation);
|
| + }
|
| +}
|
| +
|
| void WebViewImpl::updateLayerTreeViewport()
|
| {
|
| if (!page() || !m_layerTreeView)
|
| @@ -4581,6 +4599,30 @@ void WebViewImpl::forceNextDrawingBufferCreationToFail()
|
| DrawingBuffer::forceNextDrawingBufferCreationToFail();
|
| }
|
|
|
| +CompositorProxyClient* WebViewImpl::createCompositorProxyClient()
|
| +{
|
| + if (!m_mutator.get()) {
|
| + m_mutator = CompositorMutatorImpl::create();
|
| + m_layerTreeView->setMutatorClient(m_mutator->client());
|
| + }
|
| + return m_mutator->createCompositorProxyClient();
|
| +}
|
| +
|
| +void WebViewImpl::schedulePostCommitTask(PassOwnPtr<Closure> task)
|
| +{
|
| + TRACE_EVENT0("compositor-worker", "WebViewImpl::schedulePostCommitTask");
|
| + m_postCommitTasks.append(task);
|
| +}
|
| +
|
| +void WebViewImpl::didCommit()
|
| +{
|
| + TRACE_EVENT1("compositor-worker", "WebViewImpl::didCommit", "num_tasks", static_cast<int>(m_postCommitTasks.size()));
|
| + while (!m_postCommitTasks.isEmpty()) {
|
| + (*m_postCommitTasks.last())();
|
| + m_postCommitTasks.removeLast();
|
| + }
|
| +}
|
| +
|
| void WebViewImpl::updatePageOverlays()
|
| {
|
| if (m_pageColorOverlay)
|
|
|