OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "gpu/config/gpu_control_list.h" | 5 #include "gpu/config/gpu_control_list.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 control_list_logging_enabled_(false) { | 1356 control_list_logging_enabled_(false) { |
1357 } | 1357 } |
1358 | 1358 |
1359 GpuControlList::~GpuControlList() { | 1359 GpuControlList::~GpuControlList() { |
1360 Clear(); | 1360 Clear(); |
1361 } | 1361 } |
1362 | 1362 |
1363 bool GpuControlList::LoadList( | 1363 bool GpuControlList::LoadList( |
1364 const std::string& json_context, | 1364 const std::string& json_context, |
1365 GpuControlList::OsFilter os_filter) { | 1365 GpuControlList::OsFilter os_filter) { |
1366 scoped_ptr<base::Value> root = base::JSONReader::Read(json_context); | 1366 std::unique_ptr<base::Value> root = base::JSONReader::Read(json_context); |
1367 if (root.get() == NULL || !root->IsType(base::Value::TYPE_DICTIONARY)) | 1367 if (root.get() == NULL || !root->IsType(base::Value::TYPE_DICTIONARY)) |
1368 return false; | 1368 return false; |
1369 | 1369 |
1370 base::DictionaryValue* root_dictionary = | 1370 base::DictionaryValue* root_dictionary = |
1371 static_cast<base::DictionaryValue*>(root.get()); | 1371 static_cast<base::DictionaryValue*>(root.get()); |
1372 DCHECK(root_dictionary); | 1372 DCHECK(root_dictionary); |
1373 return LoadList(*root_dictionary, os_filter); | 1373 return LoadList(*root_dictionary, os_filter); |
1374 } | 1374 } |
1375 | 1375 |
1376 bool GpuControlList::LoadList(const base::DictionaryValue& parsed_json, | 1376 bool GpuControlList::LoadList(const base::DictionaryValue& parsed_json, |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 const std::string& feature_name, int feature_id) { | 1585 const std::string& feature_name, int feature_id) { |
1586 feature_map_[feature_name] = feature_id; | 1586 feature_map_[feature_name] = feature_id; |
1587 } | 1587 } |
1588 | 1588 |
1589 void GpuControlList::set_supports_feature_type_all(bool supported) { | 1589 void GpuControlList::set_supports_feature_type_all(bool supported) { |
1590 supports_feature_type_all_ = supported; | 1590 supports_feature_type_all_ = supported; |
1591 } | 1591 } |
1592 | 1592 |
1593 } // namespace gpu | 1593 } // namespace gpu |
1594 | 1594 |
OLD | NEW |