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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 9212054: Fix DirectX diagnostic collection for about:gpu page. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/common/sandbox_policy.cc ('k') | content/gpu/gpu_dx_diagnostics_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
===================================================================
--- content/gpu/gpu_child_thread.cc (revision 118516)
+++ content/gpu/gpu_child_thread.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/threading/worker_pool.h"
-#include "base/win/scoped_com_initializer.h"
#include "build/build_config.h"
#include "content/common/child_process.h"
#include "content/common/gpu/gpu_messages.h"
@@ -173,18 +172,21 @@
// Prevent concurrent collection of DirectX diagnostics.
collecting_dx_diagnostics_ = true;
- // Asynchronously collect the DirectX diagnostics because this can take a
- // couple of seconds.
- if (!base::WorkerPool::PostTask(
- FROM_HERE, base::Bind(&GpuChildThread::CollectDxDiagnostics, this),
- true)) {
- // Flag GPU info as complete if the DirectX diagnostics cannot be
- // collected.
- collecting_dx_diagnostics_ = false;
- gpu_info_.finalized = true;
- } else {
- // Do not send response if we are still completing the GPUInfo struct
- return;
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableGpuSandbox)) {
+ // Asynchronously collect the DirectX diagnostics because this can take a
+ // couple of seconds.
+ if (!base::WorkerPool::PostTask(
+ FROM_HERE, base::Bind(&GpuChildThread::CollectDxDiagnostics, this),
+ true)) {
+ // Flag GPU info as complete if the DirectX diagnostics cannot be
+ // collected.
+ collecting_dx_diagnostics_ = false;
+ gpu_info_.finalized = true;
+ } else {
+ // Do not send response if we are still completing the GPUInfo struct
+ return;
+ }
}
}
#endif
@@ -217,8 +219,6 @@
// Runs on a worker thread. The GPU process never terminates voluntarily so
// it is safe to assume that its message loop is valid.
void GpuChildThread::CollectDxDiagnostics(GpuChildThread* thread) {
- base::win::ScopedCOMInitializer com_initializer;
-
content::DxDiagNode node;
gpu_info_collector::GetDxDiagnostics(&node);
« no previous file with comments | « content/common/sandbox_policy.cc ('k') | content/gpu/gpu_dx_diagnostics_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698