| OLD | NEW |
| 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 "content/browser/gpu/gpu_internals_ui.h" | 5 #include "content/browser/gpu/gpu_internals_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 status += "_software_multithreaded"; | 362 status += "_software_multithreaded"; |
| 363 else | 363 else |
| 364 status += "_software"; | 364 status += "_software"; |
| 365 } else { | 365 } else { |
| 366 if (kGpuFeatureInfo[i].fallback_to_software) | 366 if (kGpuFeatureInfo[i].fallback_to_software) |
| 367 status += "_software"; | 367 status += "_software"; |
| 368 else | 368 else |
| 369 status += "_off"; | 369 status += "_off"; |
| 370 } | 370 } |
| 371 } else if (GpuDataManagerImpl::GetInstance()-> | 371 } else if (GpuDataManagerImpl::GetInstance()-> |
| 372 ShouldUseSoftwareRendering()) { | 372 ShouldUseSwiftShader()) { |
| 373 status = "unavailable_software"; | 373 status = "unavailable_software"; |
| 374 } else if (kGpuFeatureInfo[i].blocked || | 374 } else if (kGpuFeatureInfo[i].blocked || |
| 375 gpu_access_blocked) { | 375 gpu_access_blocked) { |
| 376 status = "unavailable"; | 376 status = "unavailable"; |
| 377 if (kGpuFeatureInfo[i].fallback_to_software) | 377 if (kGpuFeatureInfo[i].fallback_to_software) |
| 378 status += "_software"; | 378 status += "_software"; |
| 379 else | 379 else |
| 380 status += "_off"; | 380 status += "_off"; |
| 381 } else { | 381 } else { |
| 382 status = "enabled"; | 382 status = "enabled"; |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 : WebUIController(web_ui) { | 655 : WebUIController(web_ui) { |
| 656 web_ui->AddMessageHandler(new GpuMessageHandler()); | 656 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 657 | 657 |
| 658 // Set up the chrome://gpu/ source. | 658 // Set up the chrome://gpu/ source. |
| 659 BrowserContext* browser_context = | 659 BrowserContext* browser_context = |
| 660 web_ui->GetWebContents()->GetBrowserContext(); | 660 web_ui->GetWebContents()->GetBrowserContext(); |
| 661 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 661 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 662 } | 662 } |
| 663 | 663 |
| 664 } // namespace content | 664 } // namespace content |
| OLD | NEW |