OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/gpu_process_host.h" | 5 #include "chrome/browser/gpu_process_host.h" |
6 | 6 |
7 #include "app/app_switches.h" | 7 #include "app/app_switches.h" |
| 8 #include "app/gfx/gl/gl_implementation.h" |
8 #include "base/command_line.h" | 9 #include "base/command_line.h" |
9 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
10 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
11 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
12 #include "chrome/browser/browser_thread.h" | 13 #include "chrome/browser/browser_thread.h" |
13 #include "chrome/browser/gpu_blacklist.h" | 14 #include "chrome/browser/gpu_blacklist.h" |
14 #include "chrome/browser/gpu_process_host_ui_shim.h" | 15 #include "chrome/browser/gpu_process_host_ui_shim.h" |
15 #include "chrome/browser/renderer_host/render_message_filter.h" | 16 #include "chrome/browser/renderer_host/render_message_filter.h" |
16 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 17 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
17 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 397 |
397 bool GpuProcessHost::LoadGpuBlacklist() { | 398 bool GpuProcessHost::LoadGpuBlacklist() { |
398 if (gpu_blacklist_.get() != NULL) | 399 if (gpu_blacklist_.get() != NULL) |
399 return true; | 400 return true; |
400 static const base::StringPiece gpu_blacklist_json( | 401 static const base::StringPiece gpu_blacklist_json( |
401 ResourceBundle::GetSharedInstance().GetRawDataResource( | 402 ResourceBundle::GetSharedInstance().GetRawDataResource( |
402 IDR_GPU_BLACKLIST)); | 403 IDR_GPU_BLACKLIST)); |
403 GpuBlacklist* blacklist = new GpuBlacklist(); | 404 GpuBlacklist* blacklist = new GpuBlacklist(); |
404 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 405 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
405 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 406 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
| 407 browser_command_line.GetSwitchValueASCII( |
| 408 switches::kUseGL) == gfx::kGLImplementationOSMesaName || |
406 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { | 409 blacklist->LoadGpuBlacklist(gpu_blacklist_json.as_string(), true)) { |
407 gpu_blacklist_.reset(blacklist); | 410 gpu_blacklist_.reset(blacklist); |
408 return true; | 411 return true; |
409 } | 412 } |
410 delete blacklist; | 413 delete blacklist; |
411 return false; | 414 return false; |
412 } | 415 } |
413 | 416 |
OLD | NEW |