OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/browser/gpu/gpu_data_manager.h" | 5 #include "content/browser/gpu/gpu_data_manager.h" |
6 | 6 |
7 #if defined(OS_MACOSX) | 7 #if defined(OS_MACOSX) |
8 #include <CoreGraphics/CGDisplayConfiguration.h> | 8 #include <CoreGraphics/CGDisplayConfiguration.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 gpu_info().gl_extensions)); | 313 gpu_info().gl_extensions)); |
314 | 314 |
315 DictionaryValue* info = new DictionaryValue(); | 315 DictionaryValue* info = new DictionaryValue(); |
316 info->Set("basic_info", basic_info); | 316 info->Set("basic_info", basic_info); |
317 | 317 |
318 #if defined(OS_WIN) | 318 #if defined(OS_WIN) |
319 Value* dx_info; | 319 Value* dx_info; |
320 if (gpu_info().dx_diagnostics.children.size()) | 320 if (gpu_info().dx_diagnostics.children.size()) |
321 dx_info = DxDiagNodeToList(gpu_info().dx_diagnostics); | 321 dx_info = DxDiagNodeToList(gpu_info().dx_diagnostics); |
322 else | 322 else |
323 dx_info = Value::CreateNullValue(); | 323 dx_info = base::NullValue(); |
324 info->Set("diagnostics", dx_info); | 324 info->Set("diagnostics", dx_info); |
325 #endif | 325 #endif |
326 | 326 |
327 return info; | 327 return info; |
328 } | 328 } |
329 | 329 |
330 void GpuDataManager::RunGpuInfoUpdateCallbacks() { | 330 void GpuDataManager::RunGpuInfoUpdateCallbacks() { |
331 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { | 331 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { |
332 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, | 332 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, |
333 NewRunnableMethod(this, &GpuDataManager::RunGpuInfoUpdateCallbacks)); | 333 NewRunnableMethod(this, &GpuDataManager::RunGpuInfoUpdateCallbacks)); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 387 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
388 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || | 388 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) || |
389 browser_command_line.GetSwitchValueASCII( | 389 browser_command_line.GetSwitchValueASCII( |
390 switches::kUseGL) == gfx::kGLImplementationOSMesaName) | 390 switches::kUseGL) == gfx::kGLImplementationOSMesaName) |
391 return NULL; | 391 return NULL; |
392 // No need to return an empty blacklist. | 392 // No need to return an empty blacklist. |
393 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) | 393 if (gpu_blacklist_.get() != NULL && gpu_blacklist_->max_entry_id() == 0) |
394 return NULL; | 394 return NULL; |
395 return gpu_blacklist_.get(); | 395 return gpu_blacklist_.get(); |
396 } | 396 } |
OLD | NEW |