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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 7 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
« 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 1a22148cba607edced1e58d6a6ce4b2c1f772b5a..efbf922cdfbdac898eab223349a8e45aba96ae5b 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -113,6 +113,7 @@
#include "platform/fonts/FontCache.h"
#include "platform/graphics/Color.h"
#include "platform/graphics/CompositorFactory.h"
+#include "platform/graphics/CompositorMutatorClient.h"
#include "platform/graphics/FirstPaintInvalidationTracking.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/Image.h"
@@ -153,6 +154,7 @@
#include "public/web/WebViewClient.h"
#include "public/web/WebWindowFeatures.h"
#include "web/CompositionUnderlineVectorBuilder.h"
+#include "web/CompositorMutatorImpl.h"
#include "web/CompositorProxyClientImpl.h"
#include "web/ContextFeaturesClientImpl.h"
#include "web/ContextMenuAllowedScope.h"
@@ -445,6 +447,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
, m_shouldDispatchFirstLayoutAfterFinishedLoading(false)
, m_displayMode(WebDisplayModeBrowser)
, m_elasticOverscroll(FloatSize())
+ , m_mutator(nullptr)
, m_scheduler(adoptPtr(Platform::current()->currentThread()->scheduler()->createWebViewScheduler(this).release()))
, m_lastFrameTimeMonotonic(0)
{
@@ -2813,6 +2816,7 @@ void WebViewImpl::willCloseLayerTreeView()
else
setRootGraphicsLayer(nullptr);
+ m_mutator = nullptr;
m_layerTreeView = nullptr;
}
@@ -4548,7 +4552,12 @@ void WebViewImpl::forceNextDrawingBufferCreationToFail()
CompositorProxyClient* WebViewImpl::createCompositorProxyClient()
{
- return new CompositorProxyClientImpl();
+ 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);
}
void WebViewImpl::updatePageOverlays()
« 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