| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); | 368 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); |
| 369 | 369 |
| 370 base::ListValue* problem_list = new base::ListValue(); | 370 base::ListValue* problem_list = new base::ListValue(); |
| 371 manager->GetBlacklistReasons(problem_list); | 371 manager->GetBlacklistReasons(problem_list); |
| 372 | 372 |
| 373 if (gpu_access_blocked) { | 373 if (gpu_access_blocked) { |
| 374 auto problem = base::MakeUnique<base::DictionaryValue>(); | 374 auto problem = base::MakeUnique<base::DictionaryValue>(); |
| 375 problem->SetString("description", | 375 problem->SetString("description", |
| 376 "GPU process was unable to boot: " + gpu_access_blocked_reason); | 376 "GPU process was unable to boot: " + gpu_access_blocked_reason); |
| 377 problem->Set("crBugs", new base::ListValue()); | 377 problem->Set("crBugs", new base::ListValue()); |
| 378 problem->Set("webkitBugs", new base::ListValue()); | |
| 379 base::ListValue* disabled_features = new base::ListValue(); | 378 base::ListValue* disabled_features = new base::ListValue(); |
| 380 disabled_features->AppendString("all"); | 379 disabled_features->AppendString("all"); |
| 381 problem->Set("affectedGpuSettings", disabled_features); | 380 problem->Set("affectedGpuSettings", disabled_features); |
| 382 problem->SetString("tag", "disabledFeatures"); | 381 problem->SetString("tag", "disabledFeatures"); |
| 383 problem_list->Insert(0, std::move(problem)); | 382 problem_list->Insert(0, std::move(problem)); |
| 384 } | 383 } |
| 385 | 384 |
| 386 bool eof = false; | 385 bool eof = false; |
| 387 for (size_t i = 0; !eof; ++i) { | 386 for (size_t i = 0; !eof; ++i) { |
| 388 const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); | 387 const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); |
| 389 if (gpu_feature_info.disabled) { | 388 if (gpu_feature_info.disabled) { |
| 390 std::unique_ptr<base::DictionaryValue> problem( | 389 std::unique_ptr<base::DictionaryValue> problem( |
| 391 new base::DictionaryValue()); | 390 new base::DictionaryValue()); |
| 392 problem->SetString( | 391 problem->SetString( |
| 393 "description", gpu_feature_info.disabled_description); | 392 "description", gpu_feature_info.disabled_description); |
| 394 problem->Set("crBugs", new base::ListValue()); | 393 problem->Set("crBugs", new base::ListValue()); |
| 395 problem->Set("webkitBugs", new base::ListValue()); | |
| 396 base::ListValue* disabled_features = new base::ListValue(); | 394 base::ListValue* disabled_features = new base::ListValue(); |
| 397 disabled_features->AppendString(gpu_feature_info.name); | 395 disabled_features->AppendString(gpu_feature_info.name); |
| 398 problem->Set("affectedGpuSettings", disabled_features); | 396 problem->Set("affectedGpuSettings", disabled_features); |
| 399 problem->SetString("tag", "disabledFeatures"); | 397 problem->SetString("tag", "disabledFeatures"); |
| 400 problem_list->Append(std::move(problem)); | 398 problem_list->Append(std::move(problem)); |
| 401 } | 399 } |
| 402 } | 400 } |
| 403 return problem_list; | 401 return problem_list; |
| 404 } | 402 } |
| 405 | 403 |
| 406 std::vector<std::string> GetDriverBugWorkarounds() { | 404 std::vector<std::string> GetDriverBugWorkarounds() { |
| 407 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 405 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 408 } | 406 } |
| 409 | 407 |
| 410 } // namespace content | 408 } // namespace content |
| OLD | NEW |