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

Unified Diff: content/gpu/gpu_main.cc

Issue 1007513006: Add ANGLE Platform implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed pimans' review feedback Created 5 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/content_unittests.isolate ('k') | extensions/extensions_browsertests.isolate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_main.cc
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index b34d42f990710d9ec779ffa4d2ebddbf086bee7e..76a6020e0a2a5929f7b865f862c3807111b737b1 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -12,6 +12,7 @@
#include "base/lazy_instance.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram.h"
+#include "base/metrics/statistics_recorder.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
@@ -214,14 +215,14 @@ int GpuMain(const MainFunctionParams& parameters) {
watchdog_thread->StartWithOptions(options);
}
+ // Initializes StatisticsRecorder which tracks UMA histograms.
+ base::StatisticsRecorder::Initialize();
+
gpu::GPUInfo gpu_info;
// Get vendor_id, device_id, driver_version from browser process through
// commandline switches.
GetGpuInfoFromCommandLine(gpu_info, command_line);
- base::TimeDelta collect_context_time;
- base::TimeDelta initialize_one_off_time;
-
// Warm up resources that don't need access to GPUInfo.
if (WarmUpSandbox(command_line)) {
#if defined(OS_LINUX)
@@ -293,15 +294,18 @@ int GpuMain(const MainFunctionParams& parameters) {
#endif // !defined(OS_CHROMEOS)
#endif // defined(OS_LINUX)
#endif // !defined(OS_MACOSX)
- collect_context_time =
+ base::TimeDelta collect_context_time =
base::TimeTicks::Now() - before_collect_context_graphics_info;
+ UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo",
+ collect_context_time);
} else { // gl_initialized
VLOG(1) << "gfx::GLSurface::InitializeOneOff failed";
dead_on_arrival = true;
}
- initialize_one_off_time =
+ base::TimeDelta initialize_one_off_time =
base::TimeTicks::Now() - before_initialize_one_off;
+ UMA_HISTOGRAM_TIMES("GPU.InitializeOneOffTime", initialize_one_off_time);
if (enable_watchdog && delayed_watchdog_enable) {
watchdog_thread = new GpuWatchdogThread(kGpuTimeout);
@@ -342,11 +346,6 @@ int GpuMain(const MainFunctionParams& parameters) {
GpuProcess gpu_process;
- // These UMA must be stored after GpuProcess is constructed as it
- // initializes StatisticsRecorder which tracks the histograms.
- UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo", collect_context_time);
- UMA_HISTOGRAM_TIMES("GPU.InitializeOneOffTime", initialize_one_off_time);
-
GpuChildThread* child_thread = new GpuChildThread(watchdog_thread.get(),
dead_on_arrival,
gpu_info,
« no previous file with comments | « content/content_unittests.isolate ('k') | extensions/extensions_browsertests.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698