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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 1406323005: gpu: Recompute driver bug workarounds on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expand comment Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <dwmapi.h> 8 #include <dwmapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // crash. 285 // crash.
286 // By skipping the following code on Mac, we don't really lose anything, 286 // By skipping the following code on Mac, we don't really lose anything,
287 // because the basic GPU information is passed down from browser process 287 // because the basic GPU information is passed down from browser process
288 // and we already registered them through SetGpuInfo() above. 288 // and we already registered them through SetGpuInfo() above.
289 base::TimeTicks before_collect_context_graphics_info = 289 base::TimeTicks before_collect_context_graphics_info =
290 base::TimeTicks::Now(); 290 base::TimeTicks::Now();
291 #if !defined(OS_MACOSX) 291 #if !defined(OS_MACOSX)
292 if (!CollectGraphicsInfo(gpu_info)) 292 if (!CollectGraphicsInfo(gpu_info))
293 dead_on_arrival = true; 293 dead_on_arrival = true;
294 294
295 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 295 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_LINUX)
296 // Recompute gpu driver bug workarounds - this is specifically useful 296 // Recompute gpu driver bug workarounds.
297 // on systems where vendor_id/device_id aren't available. 297 // This is necessary on systems where vendor_id/device_id aren't available
298 // (Chrome OS, Android) or where workarounds may be dependent on GL_VENDOR
299 // and GL_RENDERER strings which are lazily computed (Linux).
298 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { 300 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
299 gpu::ApplyGpuDriverBugWorkarounds( 301 gpu::ApplyGpuDriverBugWorkarounds(
300 gpu_info, const_cast<base::CommandLine*>(&command_line)); 302 gpu_info, const_cast<base::CommandLine*>(&command_line));
301 } 303 }
302 #endif 304 #endif
303 305
304 #if defined(OS_LINUX) 306 #if defined(OS_LINUX)
305 initialized_gl_context = true; 307 initialized_gl_context = true;
306 #if !defined(OS_CHROMEOS) 308 #if !defined(OS_CHROMEOS)
307 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA 309 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return true; 561 return true;
560 } 562 }
561 563
562 return false; 564 return false;
563 } 565 }
564 #endif // defined(OS_WIN) 566 #endif // defined(OS_WIN)
565 567
566 } // namespace. 568 } // namespace.
567 569
568 } // namespace content 570 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698