From 29875ab2df9377a90e2f201a40325750b601f94d Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Fri, 27 Mar 2020 10:00:50 +0100 Subject: Mark cleanup for ImageTransportFactory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jüri Valdmann --- src/core/web_engine_context.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') 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::ImageTransportFactory::GetInstance()); + factory->PrepareForShutDown(); vizCompositorThreadRunner->CleanupForShutdown(base::BindOnce(&completeVizCleanup)); } -- cgit v1.2.3