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> |
| 10 #include <utility> |
| 11 |
9 #include "base/command_line.h" | 12 #include "base/command_line.h" |
10 #include "base/feature_list.h" | 13 #include "base/feature_list.h" |
11 #include "base/logging.h" | 14 #include "base/logging.h" |
12 #include "base/macros.h" | 15 #include "base/macros.h" |
13 #include "base/metrics/field_trial.h" | 16 #include "base/metrics/field_trial.h" |
14 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
15 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
16 #include "build/build_config.h" | 19 #include "build/build_config.h" |
17 #include "cc/base/math_util.h" | 20 #include "cc/base/math_util.h" |
18 #include "cc/base/switches.h" | 21 #include "cc/base/switches.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 disabled_features->AppendString("all"); | 376 disabled_features->AppendString("all"); |
374 problem->Set("affectedGpuSettings", disabled_features); | 377 problem->Set("affectedGpuSettings", disabled_features); |
375 problem->SetString("tag", "disabledFeatures"); | 378 problem->SetString("tag", "disabledFeatures"); |
376 problem_list->Insert(0, problem); | 379 problem_list->Insert(0, problem); |
377 } | 380 } |
378 | 381 |
379 bool eof = false; | 382 bool eof = false; |
380 for (size_t i = 0; !eof; ++i) { | 383 for (size_t i = 0; !eof; ++i) { |
381 const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); | 384 const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); |
382 if (gpu_feature_info.disabled) { | 385 if (gpu_feature_info.disabled) { |
383 base::DictionaryValue* problem = new base::DictionaryValue(); | 386 std::unique_ptr<base::DictionaryValue> problem( |
| 387 new base::DictionaryValue()); |
384 problem->SetString( | 388 problem->SetString( |
385 "description", gpu_feature_info.disabled_description); | 389 "description", gpu_feature_info.disabled_description); |
386 problem->Set("crBugs", new base::ListValue()); | 390 problem->Set("crBugs", new base::ListValue()); |
387 problem->Set("webkitBugs", new base::ListValue()); | 391 problem->Set("webkitBugs", new base::ListValue()); |
388 base::ListValue* disabled_features = new base::ListValue(); | 392 base::ListValue* disabled_features = new base::ListValue(); |
389 disabled_features->AppendString(gpu_feature_info.name); | 393 disabled_features->AppendString(gpu_feature_info.name); |
390 problem->Set("affectedGpuSettings", disabled_features); | 394 problem->Set("affectedGpuSettings", disabled_features); |
391 problem->SetString("tag", "disabledFeatures"); | 395 problem->SetString("tag", "disabledFeatures"); |
392 problem_list->Append(problem); | 396 problem_list->Append(std::move(problem)); |
393 } | 397 } |
394 } | 398 } |
395 return problem_list; | 399 return problem_list; |
396 } | 400 } |
397 | 401 |
398 std::vector<std::string> GetDriverBugWorkarounds() { | 402 std::vector<std::string> GetDriverBugWorkarounds() { |
399 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 403 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
400 } | 404 } |
401 | 405 |
402 } // namespace content | 406 } // namespace content |
OLD | NEW |