Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 2753293003: gpu: Replace GpuMsg_CollectGraphicsInfo with mojom API. (Closed)
Patch Set: tot merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 13077b3bc53acdfb9e6f7db2bd6561aa3ea3f12b..715597db0e30489036eb3b67a4ec8ceea7a42cdd 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -234,7 +234,6 @@ bool GpuChildThread::Send(IPC::Message* msg) {
bool GpuChildThread::OnControlMessageReceived(const IPC::Message& msg) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(GpuChildThread, msg)
- IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, OnCollectGraphicsInfo)
IPC_MESSAGE_HANDLER(GpuMsg_GpuSwitched, OnGpuSwitched)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -317,62 +316,6 @@ void GpuChildThread::CreateDisplayCompositor(
NOTREACHED();
}
-void GpuChildThread::OnCollectGraphicsInfo() {
- if (dead_on_arrival_)
- return;
-
- gpu::GPUInfo gpu_info(gpu_service_->gpu_info());
-#if defined(OS_MACOSX)
- // gpu::CollectContextGraphicsInfo() is already called during gpu process
- // initialization (see GpuInit::InitializeAndStartSandbox()) on non-mac
- // platforms, and during in-browser gpu thread initialization on all platforms
- // (See InProcessGpuThread::Init()).
- if (!in_browser_process_) {
- DCHECK_EQ(gpu::kCollectInfoNone, gpu_info.context_info_state);
- gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info);
- switch (result) {
- case gpu::kCollectInfoFatalFailure:
- LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal).";
- // TODO(piman): can we signal overall failure?
- break;
- case gpu::kCollectInfoNonFatalFailure:
- DVLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal).";
- break;
- case gpu::kCollectInfoNone:
- NOTREACHED();
- break;
- case gpu::kCollectInfoSuccess:
- break;
- }
- GetContentClient()->SetGpuInfo(gpu_info);
- }
-#endif
-
-#if defined(OS_WIN)
- // GPU full info collection should only happen on un-sandboxed GPU process
- // or single process/in-process gpu mode on Windows.
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- DCHECK(command_line->HasSwitch(switches::kDisableGpuSandbox) ||
- in_browser_process_);
-
- // This is slow, but it's the only thing the unsandboxed GPU process does,
- // and GpuDataManager prevents us from sending multiple collecting requests,
- // so it's OK to be blocking.
- gpu::GetDxDiagnostics(&gpu_info.dx_diagnostics);
- gpu_info.dx_diagnostics_info_state = gpu::kCollectInfoSuccess;
-#endif // OS_WIN
-
- gpu_service_->set_gpu_info(gpu_info);
- Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info));
-
-#if defined(OS_WIN)
- if (!in_browser_process_) {
- // The unsandboxed GPU process fulfilled its duty. Rest in peace.
- base::MessageLoop::current()->QuitWhenIdle();
- }
-#endif // OS_WIN
-}
-
void GpuChildThread::OnGpuSwitched() {
DVLOG(1) << "GPU: GPU has switched";
// Notify observers in the GPU process.
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698