summaryrefslogtreecommitdiffstats
path: root/lib/web_contents_adapter.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-11-13 11:14:04 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-15 13:49:20 +0100
commit42a4854214a7440f482f0ba613725701688a7efe (patch)
tree56f52c9a3141de3cb06759c87845b5ed2b03e831 /lib/web_contents_adapter.cpp
parentf5be472e0ba4aa19d0c0f91a848dfa5be9ebaa3b (diff)
Delegated renderer: enable by default for QQuickWebView.
This also allows the software code path to be enabled: - Programmatically by setting this dynamic property on the QCoreApplication: "QQuickWebEngineView_DisableHardwareAcceleration" - Through the Chromium command line switch "--disable-delegated-renderer" for quick development use cases. Change-Id: I32136d880444e0a24f042c7c4862950b7ed0c910 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'lib/web_contents_adapter.cpp')
-rw-r--r--lib/web_contents_adapter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/web_contents_adapter.cpp b/lib/web_contents_adapter.cpp
index a5eab5648..c09fc362a 100644
--- a/lib/web_contents_adapter.cpp
+++ b/lib/web_contents_adapter.cpp
@@ -147,21 +147,21 @@ static void callbackOnEvaluateJS(JSCallbackBase *callback, const base::Value *re
class WebContentsAdapterPrivate {
public:
- WebContentsAdapterPrivate();
+ WebContentsAdapterPrivate(WebContentsAdapterClient::RenderingMode renderingMode);
scoped_refptr<WebEngineContext> engineContext;
scoped_ptr<content::WebContents> webContents;
scoped_ptr<WebContentsDelegateQt> webContentsDelegate;
WebContentsAdapterClient *adapterClient;
};
-WebContentsAdapterPrivate::WebContentsAdapterPrivate()
+WebContentsAdapterPrivate::WebContentsAdapterPrivate(WebContentsAdapterClient::RenderingMode renderingMode)
// This has to be the first thing we create, and the last we destroy.
- : engineContext(WebEngineContext::current())
+ : engineContext(WebEngineContext::currentOrCreate(renderingMode))
{
}
-WebContentsAdapter::WebContentsAdapter(content::WebContents *webContents)
- : d_ptr(new WebContentsAdapterPrivate)
+WebContentsAdapter::WebContentsAdapter(WebContentsAdapterClient::RenderingMode renderingMode, content::WebContents *webContents)
+ : d_ptr(new WebContentsAdapterPrivate(renderingMode))
{
Q_D(WebContentsAdapter);
d->webContents.reset(webContents);