From 798134400a22f878b6cfd186b3792ecedb4d9123 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 1 Apr 2014 14:46:37 +0200 Subject: 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 --- src/core/web_engine_context.cpp | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'src/core/web_engine_context.cpp') 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::currentOrCreate(WebContentsAdapterClient::RenderingMode renderingMode) +scoped_refptr 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::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 -- cgit v1.2.3