| 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/compositor_util.h" | 5 #include "content/browser/gpu/compositor_util.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 359 } |
| 360 } | 360 } |
| 361 // TODO(reveman): Remove this when crbug.com/223286 has been fixed. | 361 // TODO(reveman): Remove this when crbug.com/223286 has been fixed. |
| 362 if (gpu_feature_info.name == "raster" && | 362 if (gpu_feature_info.name == "raster" && |
| 363 cc::switches::IsImplSidePaintingEnabled()) { | 363 cc::switches::IsImplSidePaintingEnabled()) { |
| 364 status = "disabled_software_multithreaded"; | 364 status = "disabled_software_multithreaded"; |
| 365 } | 365 } |
| 366 feature_status_dict->SetString( | 366 feature_status_dict->SetString( |
| 367 gpu_feature_info.name.c_str(), status.c_str()); | 367 gpu_feature_info.name.c_str(), status.c_str()); |
| 368 } | 368 } |
| 369 gpu::GpuSwitchingOption gpu_switching_option = | |
| 370 manager->GetGpuSwitchingOption(); | |
| 371 if (gpu_switching_option != gpu::GPU_SWITCHING_OPTION_UNKNOWN) { | |
| 372 std::string gpu_switching; | |
| 373 switch (gpu_switching_option) { | |
| 374 case gpu::GPU_SWITCHING_OPTION_AUTOMATIC: | |
| 375 gpu_switching = "gpu_switching_automatic"; | |
| 376 break; | |
| 377 case gpu::GPU_SWITCHING_OPTION_FORCE_DISCRETE: | |
| 378 gpu_switching = "gpu_switching_force_discrete"; | |
| 379 break; | |
| 380 case gpu::GPU_SWITCHING_OPTION_FORCE_INTEGRATED: | |
| 381 gpu_switching = "gpu_switching_force_integrated"; | |
| 382 break; | |
| 383 default: | |
| 384 break; | |
| 385 } | |
| 386 feature_status_dict->SetString("gpu_switching", gpu_switching.c_str()); | |
| 387 } | |
| 388 return feature_status_dict; | 369 return feature_status_dict; |
| 389 } | 370 } |
| 390 | 371 |
| 391 base::Value* GetProblems() { | 372 base::Value* GetProblems() { |
| 392 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); | 373 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
| 393 std::string gpu_access_blocked_reason; | 374 std::string gpu_access_blocked_reason; |
| 394 bool gpu_access_blocked = | 375 bool gpu_access_blocked = |
| 395 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); | 376 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); |
| 396 | 377 |
| 397 base::ListValue* problem_list = new base::ListValue(); | 378 base::ListValue* problem_list = new base::ListValue(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 420 return problem_list; | 401 return problem_list; |
| 421 } | 402 } |
| 422 | 403 |
| 423 base::Value* GetDriverBugWorkarounds() { | 404 base::Value* GetDriverBugWorkarounds() { |
| 424 base::ListValue* workaround_list = new base::ListValue(); | 405 base::ListValue* workaround_list = new base::ListValue(); |
| 425 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 406 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
| 426 return workaround_list; | 407 return workaround_list; |
| 427 } | 408 } |
| 428 | 409 |
| 429 } // namespace content | 410 } // namespace content |
| OLD | NEW |