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

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

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: fix win clang build 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/service/gpu_init.h ('k') | services/ui/gpu/gpu_main.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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { 206 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
207 // TODO: this can not affect disabled extensions, since they're already 207 // TODO: this can not affect disabled extensions, since they're already
208 // initialized in the bindings. This should be moved before bindings 208 // initialized in the bindings. This should be moved before bindings
209 // initialization. However, populating GPUInfo fully works only on Android. 209 // initialization. However, populating GPUInfo fully works only on Android.
210 // Other platforms would need the bindings to query GL strings. 210 // Other platforms would need the bindings to query GL strings.
211 gpu::ApplyGpuDriverBugWorkarounds( 211 gpu::ApplyGpuDriverBugWorkarounds(
212 gpu_info_, const_cast<base::CommandLine*>(&command_line)); 212 gpu_info_, const_cast<base::CommandLine*>(&command_line));
213 } 213 }
214 #endif // !defined(OS_MACOSX) 214 #endif // !defined(OS_MACOSX)
215 215
216 gpu_feature_info_ = gpu::GetGpuFeatureInfo(gpu_info_, command_line);
217
216 base::TimeDelta collect_context_time = 218 base::TimeDelta collect_context_time =
217 base::TimeTicks::Now() - before_collect_context_graphics_info; 219 base::TimeTicks::Now() - before_collect_context_graphics_info;
218 UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo", collect_context_time); 220 UMA_HISTOGRAM_TIMES("GPU.CollectContextGraphicsInfo", collect_context_time);
219 221
220 base::TimeDelta initialize_one_off_time = 222 base::TimeDelta initialize_one_off_time =
221 base::TimeTicks::Now() - before_initialize_one_off; 223 base::TimeTicks::Now() - before_initialize_one_off;
222 UMA_HISTOGRAM_MEDIUM_TIMES("GPU.InitializeOneOffMediumTime", 224 UMA_HISTOGRAM_MEDIUM_TIMES("GPU.InitializeOneOffMediumTime",
223 initialize_one_off_time); 225 initialize_one_off_time);
224 226
225 // OSMesa is expected to run very slowly, so disable the watchdog in that 227 // OSMesa is expected to run very slowly, so disable the watchdog in that
226 // case. 228 // case.
227 if (gl::GetGLImplementation() == gl::kGLImplementationOSMesaGL) { 229 if (gl::GetGLImplementation() == gl::kGLImplementationOSMesaGL) {
228 if (watchdog_thread_) 230 if (watchdog_thread_)
229 watchdog_thread_->Stop(); 231 watchdog_thread_->Stop();
230 watchdog_thread_ = nullptr; 232 watchdog_thread_ = nullptr;
231 } else if (enable_watchdog && delayed_watchdog_enable) { 233 } else if (enable_watchdog && delayed_watchdog_enable) {
232 watchdog_thread_ = gpu::GpuWatchdogThread::Create(); 234 watchdog_thread_ = gpu::GpuWatchdogThread::Create();
233 } 235 }
234 236
235 if (!gpu_info_.sandboxed) 237 if (!gpu_info_.sandboxed)
236 gpu_info_.sandboxed = 238 gpu_info_.sandboxed =
237 sandbox_helper_->EnsureSandboxInitialized(watchdog_thread_.get()); 239 sandbox_helper_->EnsureSandboxInitialized(watchdog_thread_.get());
238 return true; 240 return true;
239 } 241 }
240 242
241 } // namespace gpu 243 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_init.h ('k') | services/ui/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698