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

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

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/web.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e84942261f05499a9376018af901cf453eab24a0..f87dc711b6e6a31a6f27f9c52c8b6fd980ed3903 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -35,6 +35,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"
@@ -93,6 +94,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"
@@ -128,6 +130,7 @@
#include "public/platform/WebGestureCurve.h"
#include "public/platform/WebImage.h"
#include "public/platform/WebLayerTreeView.h"
+#include "public/platform/WebMutation.h"
#include "public/platform/WebURLRequest.h"
#include "public/platform/WebVector.h"
#include "public/platform/WebViewScheduler.h"
@@ -169,6 +172,7 @@
#include "web/WebDevToolsAgentImpl.h"
#include "web/WebInputEventConversion.h"
#include "web/WebLocalFrameImpl.h"
+#include "web/WebMutatorImpl.h"
#include "web/WebPagePopupImpl.h"
#include "web/WebPluginContainerImpl.h"
#include "web/WebRemoteFrameImpl.h"
@@ -4435,6 +4439,19 @@ void WebViewImpl::recordFrameTimingEvent(FrameTimingEventType eventType, int64_t
}
}
+void WebViewImpl::applyMutations(const WebMutationMap& mutations)
+{
+ TRACE_EVENT0("compositor-worker", "WebViewImpl::applyMutations");
+ for (const auto& pair : mutations) {
+ int elementId = pair.first;
+ const WebMutation& mutation = pair.second;
+ Node* node = DOMNodeIds::nodeForId(elementId);
+ if (!node || !toElement(node))
+ continue;
+ toElement(node)->updateFromMutation(mutation);
+ }
+}
+
void WebViewImpl::updateLayerTreeViewport()
{
if (!page() || !m_layerTreeView)
@@ -4578,6 +4595,30 @@ void WebViewImpl::forceNextDrawingBufferCreationToFail()
DrawingBuffer::forceNextDrawingBufferCreationToFail();
}
+CompositorProxyClient* WebViewImpl::createCompositorProxyClient()
+{
+ if (!m_mutator.get()) {
+ m_mutator = WebMutatorImpl::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)
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698