diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-04-01 14:46:37 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-08 14:00:13 +0200 |
commit | 798134400a22f878b6cfd186b3792ecedb4d9123 (patch) | |
tree | 5ff358f5e894fa60c19c1d29067a4c9618432307 /src/core/web_engine_context.cpp | |
parent | 96425960f9d57387c33e3ba50785aaa81255bc98 (diff) |
Get rid of the BackingStore rendering path
Now that the widgets view is also using the delegated renderer,
there are no supported configuration that use the BackingStore
rendering path, itself on the way of deprecation in Chromium.
Change-Id: I4ab889f6a7c65e8447c259faf2c7a98b88c1acf5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 1d4067fda..7fd7e577d 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -91,38 +91,22 @@ WebEngineContext::~WebEngineContext() m_runLoop->AfterRun(); } -scoped_refptr<WebEngineContext> WebEngineContext::currentOrCreate(WebContentsAdapterClient::RenderingMode renderingMode) +scoped_refptr<WebEngineContext> WebEngineContext::current() { if (!sContext) { - sContext = new WebEngineContext(renderingMode); + sContext = new WebEngineContext(); // Make sure that we ramp down Chromium before QApplication destroys its X connection, etc. qAddPostRoutine(destroyContext); - } else if (renderingMode != sContext->renderingMode()) - qFatal("Switching the QtWebEngine rendering mode once initialized in an application is not supported." - " If you're using both a QQuickWebView and a QtQuick WebEngineView, make sure that the" - " later is configured to use software rendering by setting:" - "\nqApp->setProperty(\"QQuickWebEngineView_DisableHardwareAcceleration\", QVariant(true));"); - return sContext; -} - -scoped_refptr<WebEngineContext> WebEngineContext::current() -{ + } return sContext; } -WebContentsAdapterClient::RenderingMode WebEngineContext::renderingMode() -{ - return CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableDelegatedRenderer) - ? WebContentsAdapterClient::HardwareAccelerationMode - : WebContentsAdapterClient::SoftwareRenderingMode; -} - #ifndef CHROMIUM_VERSION #error Chromium version should be defined at gyp-time. Something must have gone wrong #define CHROMIUM_VERSION // This is solely to keep Qt Creator happy. #endif -WebEngineContext::WebEngineContext(WebContentsAdapterClient::RenderingMode renderingMode) +WebEngineContext::WebEngineContext() : m_mainDelegate(new ContentMainDelegateQt) , m_contentRunner(content::ContentMainRunner::Create()) , m_browserRunner(content::BrowserMainRunner::Create()) @@ -142,12 +126,9 @@ WebEngineContext::WebEngineContext(WebContentsAdapterClient::RenderingMode rende parsedCommandLine->AppendSwitchPath(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE)); parsedCommandLine->AppendSwitch(switches::kNoSandbox); parsedCommandLine->AppendSwitch(switches::kDisablePlugins); - - if (renderingMode == WebContentsAdapterClient::HardwareAccelerationMode && !parsedCommandLine->HasSwitch(switches::kDisableDelegatedRenderer)) { - parsedCommandLine->AppendSwitch(switches::kEnableDelegatedRenderer); - parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing); - parsedCommandLine->AppendSwitch(switches::kInProcessGPU); - } + parsedCommandLine->AppendSwitch(switches::kEnableDelegatedRenderer); + parsedCommandLine->AppendSwitch(switches::kEnableThreadedCompositing); + parsedCommandLine->AppendSwitch(switches::kInProcessGPU); #if defined(OS_ANDROID) // Required on Android |