summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-01-18 23:24:37 +0100
committerMichal Klocek <michal.klocek@qt.io>2023-01-19 13:45:53 +0000
commit406715225b17b2cf4204f17b9b651bef5d397392 (patch)
tree591e280a2890aa08274c3131324ca8a9572a74d6
parent97a1254923022e66fa75245c3ace64f58112cba6 (diff)
downloadqtwebengine-chromium-406715225b17b2cf4204f17b9b651bef5d397392.tar.gz
Drop dependency on content/public/browser in content gpu
We include header from content/public/browser which includes generated headers, however we do not have that dependency on content gpu. This creates build race condition as generated headers might to be in place. Unfortunately adding that dependency causes some gn asserts, as this dependency should not be allowed. Therefore, move GetInProcessGpuShareGroup from browser content to gpu content, where it make more sense. Pick-to: 102-based 108-based Change-Id: I9dfc37ddf7466ca7b431a31b379e811583790467 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/455058 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--chromium/content/gpu/gpu_child_thread.cc3
-rw-r--r--chromium/content/public/browser/content_browser_client.h8
-rw-r--r--chromium/content/public/gpu/content_gpu_client.cc4
-rw-r--r--chromium/content/public/gpu/content_gpu_client.h7
4 files changed, 12 insertions, 10 deletions
diff --git a/chromium/content/gpu/gpu_child_thread.cc b/chromium/content/gpu/gpu_child_thread.cc
index 9149f408baf..478adcc044c 100644
--- a/chromium/content/gpu/gpu_child_thread.cc
+++ b/chromium/content/gpu/gpu_child_thread.cc
@@ -23,7 +23,6 @@
#include "content/child/child_process.h"
#include "content/gpu/browser_exposed_gpu_interfaces.h"
#include "content/gpu/gpu_service_factory.h"
-#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/service_names.mojom.h"
@@ -224,7 +223,7 @@ void GpuChildThread::OnGpuServiceConnection(viz::GpuServiceImpl* gpu_service) {
#endif
#if defined(TOOLKIT_QT)
- gpu_channel_manager()->set_share_group(GetContentClient()->browser()->GetInProcessGpuShareGroup());
+ gpu_channel_manager()->set_share_group(GetContentClient()->gpu()->GetInProcessGpuShareGroup());
#endif
// Only set once per process instance.
diff --git a/chromium/content/public/browser/content_browser_client.h b/chromium/content/public/browser/content_browser_client.h
index 068e62e60dd..ef381e8bbdd 100644
--- a/chromium/content/public/browser/content_browser_client.h
+++ b/chromium/content/public/browser/content_browser_client.h
@@ -102,10 +102,6 @@ namespace device {
class LocationProvider;
} // namespace device
-namespace gl {
-class GLShareGroup;
-}
-
namespace media {
class AudioLogFactory;
class AudioManager;
@@ -993,10 +989,6 @@ class CONTENT_EXPORT ContentBrowserClient {
std::vector<std::unique_ptr<storage::FileSystemBackend>>*
additional_backends) {}
- // Allow an embedder to provide a share group reimplementation to connect renderer
- // GL contexts with the root compositor.
- virtual gl::GLShareGroup* GetInProcessGpuShareGroup() { return nullptr; }
-
// Creates a new DevToolsManagerDelegate. The caller owns the returned value.
// It's valid to return nullptr.
virtual DevToolsManagerDelegate* GetDevToolsManagerDelegate();
diff --git a/chromium/content/public/gpu/content_gpu_client.cc b/chromium/content/public/gpu/content_gpu_client.cc
index ef1b9c7caff..eb8fa67f95f 100644
--- a/chromium/content/public/gpu/content_gpu_client.cc
+++ b/chromium/content/public/gpu/content_gpu_client.cc
@@ -19,4 +19,8 @@ ContentGpuClient::GetVizCompositorThreadRunner() {
return nullptr;
}
+gl::GLShareGroup* ContentGpuClient::GetInProcessGpuShareGroup() {
+ return nullptr;
+}
+
} // namespace content
diff --git a/chromium/content/public/gpu/content_gpu_client.h b/chromium/content/public/gpu/content_gpu_client.h
index 2231ce93769..37d8d7daf23 100644
--- a/chromium/content/public/gpu/content_gpu_client.h
+++ b/chromium/content/public/gpu/content_gpu_client.h
@@ -20,6 +20,10 @@ class SharedImageManager;
class SyncPointManager;
}
+namespace gl {
+class GLShareGroup;
+}
+
namespace viz {
class VizCompositorThreadRunner;
}
@@ -53,6 +57,9 @@ class CONTENT_EXPORT ContentGpuClient {
virtual gpu::SyncPointManager* GetSyncPointManager();
virtual gpu::SharedImageManager* GetSharedImageManager();
virtual viz::VizCompositorThreadRunner* GetVizCompositorThreadRunner();
+ // Allow an embedder to provide a share group reimplementation to connect renderer
+ // GL contexts with the root compositor.
+ virtual gl::GLShareGroup* GetInProcessGpuShareGroup();
};
} // namespace content