| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 if (cc::switches::IsImplSidePaintingEnabled()) | 361 if (cc::switches::IsImplSidePaintingEnabled()) |
| 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()->ShouldUseSwiftShader()) { |
| 372 ShouldUseSoftwareRendering()) { | |
| 373 status = "unavailable_software"; | 372 status = "unavailable_software"; |
| 374 } else if (kGpuFeatureInfo[i].blocked || | 373 } else if (kGpuFeatureInfo[i].blocked || |
| 375 gpu_access_blocked) { | 374 gpu_access_blocked) { |
| 376 status = "unavailable"; | 375 status = "unavailable"; |
| 377 if (kGpuFeatureInfo[i].fallback_to_software) | 376 if (kGpuFeatureInfo[i].fallback_to_software) |
| 378 status += "_software"; | 377 status += "_software"; |
| 379 else | 378 else |
| 380 status += "_off"; | 379 status += "_off"; |
| 381 } else { | 380 } else { |
| 382 status = "enabled"; | 381 status = "enabled"; |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 : WebUIController(web_ui) { | 654 : WebUIController(web_ui) { |
| 656 web_ui->AddMessageHandler(new GpuMessageHandler()); | 655 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 657 | 656 |
| 658 // Set up the chrome://gpu/ source. | 657 // Set up the chrome://gpu/ source. |
| 659 BrowserContext* browser_context = | 658 BrowserContext* browser_context = |
| 660 web_ui->GetWebContents()->GetBrowserContext(); | 659 web_ui->GetWebContents()->GetBrowserContext(); |
| 661 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 660 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 662 } | 661 } |
| 663 | 662 |
| 664 } // namespace content | 663 } // namespace content |
| OLD | NEW |