summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-03-27 10:00:50 +0100
committerMichal Klocek <michal.klocek@qt.io>2020-04-09 08:37:07 +0200
commit29875ab2df9377a90e2f201a40325750b601f94d (patch)
treecc909c237b8537cc7ab29a4f35a700609542ef21
parent9edaf3675cb8e94372bff579cbaec022ca26ee21 (diff)
Mark cleanup for ImageTransportFactory
On viz cleanup we should not try to use viz process transport factory, use the same code path as compositor would have been already destroyed. Task-number: QTBUG-83040 Task-number: QTBUG-79864 Change-Id: I0f91b99cd5545d65500c3733ae097893d53b1cab Reviewed-by: Tamas Zakor <ztamas@inf.u-szeged.hu> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
-rw-r--r--src/core/web_engine_context.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 5e6a18e5b..88f5be726 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -53,6 +53,7 @@
#include "chrome/common/chrome_switches.h"
#include "content/gpu/gpu_child_thread.h"
#include "content/browser/compositor/surface_utils.h"
+#include "content/browser/compositor/viz_process_transport_factory.h"
#include "components/viz/host/host_frame_sink_manager.h"
#if QT_CONFIG(webengine_printing_and_pdf)
#include "chrome/browser/printing/print_job_manager.h"
@@ -255,6 +256,8 @@ static void cleanupVizProcess()
return;
waitForViz = true;
content::GetHostFrameSinkManager()->SetConnectionLostCallback(base::DoNothing());
+ auto factory = static_cast<content::VizProcessTransportFactory*>(content::ImageTransportFactory::GetInstance());
+ factory->PrepareForShutDown();
vizCompositorThreadRunner->CleanupForShutdown(base::BindOnce(&completeVizCleanup));
}