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

Side by Side Diff: gpu/ipc/service/gpu_init.cc

Issue 2690113010: Abstract OSMesa from the Layout tests (Closed)
Patch Set: Renamed "Renderer" to "GL" Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « gpu/ipc/host/gpu_memory_buffer_support.cc ('k') | mash/test/mash_test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/ipc/service/gpu_init.h" 5 #include "gpu/ipc/service/gpu_init.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 10 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 base::TimeDelta collect_context_time = 218 base::TimeDelta collect_context_time =
219 base::TimeTicks::Now() - before_collect_context_graphics_info; 219 base::TimeTicks::Now() - before_collect_context_graphics_info;
220 UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo", collect_context_time); 220 UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo", collect_context_time);
221 221
222 base::TimeDelta initialize_one_off_time = 222 base::TimeDelta initialize_one_off_time =
223 base::TimeTicks::Now() - before_initialize_one_off; 223 base::TimeTicks::Now() - before_initialize_one_off;
224 UMA_HISTOGRAM_MEDIUM_TIMES("GPU.InitializeOneOffMediumTime", 224 UMA_HISTOGRAM_MEDIUM_TIMES("GPU.InitializeOneOffMediumTime",
225 initialize_one_off_time); 225 initialize_one_off_time);
226 226
227 // OSMesa is expected to run very slowly, so disable the watchdog in that 227 // Software GL is expected to run slowly, so disable the watchdog
228 // case. 228 // in that case.
229 if (gl::GetGLImplementation() == gl::kGLImplementationOSMesaGL) { 229 if (gl::GetGLImplementation() == gl::GetSoftwareGLImplementation()) {
230 if (watchdog_thread_) 230 if (watchdog_thread_)
231 watchdog_thread_->Stop(); 231 watchdog_thread_->Stop();
232 watchdog_thread_ = nullptr; 232 watchdog_thread_ = nullptr;
233 } else if (enable_watchdog && delayed_watchdog_enable) { 233 } else if (enable_watchdog && delayed_watchdog_enable) {
234 watchdog_thread_ = gpu::GpuWatchdogThread::Create(); 234 watchdog_thread_ = gpu::GpuWatchdogThread::Create();
235 } 235 }
236 236
237 if (!gpu_info_.sandboxed) 237 if (!gpu_info_.sandboxed)
238 gpu_info_.sandboxed = 238 gpu_info_.sandboxed =
239 sandbox_helper_->EnsureSandboxInitialized(watchdog_thread_.get()); 239 sandbox_helper_->EnsureSandboxInitialized(watchdog_thread_.get());
240 return true; 240 return true;
241 } 241 }
242 242
243 } // namespace gpu 243 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/host/gpu_memory_buffer_support.cc ('k') | mash/test/mash_test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698