diff options
author | Jüri Valdmann <juri.valdmann@qt.io> | 2018-08-20 12:31:52 +0200 |
---|---|---|
committer | Jüri Valdmann <juri.valdmann@qt.io> | 2018-10-23 11:39:25 +0000 |
commit | bc2ae1dbebea3b6c71237fc3d073cec4335037d8 (patch) | |
tree | a4eb4d51ea4d13684179804369a602a1d4728007 /src/core/web_engine_context.h | |
parent | b84324ece095ad1f5a16326c49bdf1428ff5f866 (diff) |
Support running GPU service on UI thread
Create content::GpuProcess on UI thread if threaded OpenGL is not supported.
Fixes: QTBUG-71126
Change-Id: I7965dec66c8b8e9c92d292731d21ee0df5056a2e
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/web_engine_context.h')
-rw-r--r-- | src/core/web_engine_context.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index ce71984d4..036dc4ccb 100644 --- a/src/core/web_engine_context.h +++ b/src/core/web_engine_context.h @@ -52,6 +52,13 @@ class RunLoop; namespace content { class BrowserMainRunner; class ContentMainRunner; +class GpuProcess; +class GpuThreadController; +class InProcessChildThreadParams; +} + +namespace gpu { +struct GpuPreferences; } #if QT_CONFIG(webengine_printing_and_pdf) @@ -93,6 +100,12 @@ private: WebEngineContext(); ~WebEngineContext(); + static std::unique_ptr<content::GpuThreadController> createGpuThreadController( + const content::InProcessChildThreadParams ¶ms, const gpu::GpuPreferences &gpuPreferences); + static void createGpuProcess( + const content::InProcessChildThreadParams ¶ms, const gpu::GpuPreferences &gpuPreferences); + static void destroyGpuProcess(); + std::unique_ptr<base::RunLoop> m_runLoop; std::unique_ptr<ContentMainDelegateQt> m_mainDelegate; std::unique_ptr<content::ContentMainRunner> m_contentRunner; @@ -100,6 +113,8 @@ private: std::unique_ptr<QObject> m_globalQObject; std::unique_ptr<ProfileAdapter> m_defaultProfileAdapter; std::unique_ptr<DevToolsServerQt> m_devtoolsServer; + std::unique_ptr<content::GpuProcess> m_gpuProcess; + bool m_gpuProcessDestroyed = false; QVector<ProfileAdapter*> m_profileAdapters; #if QT_CONFIG(webengine_printing_and_pdf) |