From 68b9545aef894d8ba6b4ff0d4ccdb349d9aca818 Mon Sep 17 00:00:00 2001
From: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Date: Tue, 10 Dec 2013 12:52:28 +0100
Subject: [PATCH] Fix the QQuickWebEngineView rendering with 1650.

This is now initialized by Chromium in ContentMainRunnerImpl::Run,
which we bypass for our browser process.

Change-Id: Id8233df3fe12048cd2b6eaf870b161ab5d1eb089
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
---
 src/core/web_engine_context.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 7996f455b..adc7e7dac 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -52,6 +52,14 @@
 #include "content/public/common/content_paths.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/main_function_params.h"
+
+#include "content/public/browser/utility_process_host.h"
+#include "content/public/browser/render_process_host.h"
+#include "content/browser/gpu/gpu_process_host.h"
+#include "content/utility/in_process_utility_thread.h"
+#include "content/renderer/in_process_renderer_thread.h"
+#include "content/gpu/in_process_gpu_thread.h"
+
 #include "ui/gl/gl_switches.h"
 #include "webkit/common/user_agent/user_agent_util.h"
 
@@ -144,6 +152,10 @@ WebEngineContext::WebEngineContext(WebContentsAdapterClient::RenderingMode rende
     if (qApp->platformName() == QStringLiteral("xcb") && qApp->platformNativeInterface()->nativeResourceForWindow(QByteArrayLiteral("egldisplay"), 0))
         parsedCommandLine->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationEGLName);
 
+    content::UtilityProcessHost::RegisterUtilityMainThreadFactory(content::CreateInProcessUtilityThread);
+    content::RenderProcessHost::RegisterRendererMainThreadFactory(content::CreateInProcessRendererThread);
+    content::GpuProcessHost::RegisterGpuMainThreadFactory(content::CreateInProcessGpuThread);
+
     m_contentRunner->Initialize(0, 0, m_mainDelegate.get());
     m_browserRunner->Initialize(content::MainFunctionParams(*CommandLine::ForCurrentProcess()));
 
-- 
GitLab