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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 12340089: Windows: Only collect D3D11 UMA stats if the GPU process launches and initializes successfully. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 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 | « no previous file | content/gpu/gpu_info_collector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
===================================================================
--- content/browser/gpu/gpu_process_host.cc (revision 186491)
+++ content/browser/gpu/gpu_process_host.cc (working copy)
@@ -13,6 +13,7 @@
#include "base/metrics/histogram.h"
#include "base/process_util.h"
#include "base/threading/thread.h"
+#include "base/threading/worker_pool.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
@@ -23,6 +24,7 @@
#include "content/common/gpu/gpu_messages.h"
#include "content/common/view_messages.h"
#include "content/gpu/gpu_child_thread.h"
+#include "content/gpu/gpu_info_collector.h"
#include "content/gpu/gpu_process.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
@@ -654,6 +656,17 @@
void GpuProcessHost::OnInitialized(bool result) {
UMA_HISTOGRAM_BOOLEAN("GPU.GPUProcessInitialized", result);
+
+#if defined(OS_WIN)
+ // Only collect D3D11 statistics if D3D was successfully initialized in
+ // the GPU process.
+ if (result) {
+ base::WorkerPool::PostTask(
+ FROM_HERE,
+ base::Bind(&gpu_info_collector::CollectD3D11Support),
+ false);
+ }
+#endif
}
void GpuProcessHost::OnChannelEstablished(
« no previous file with comments | « no previous file | content/gpu/gpu_info_collector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698