| 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 "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 return command_line.HasSwitch(switches::kForceGpuRasterization); | 270 return command_line.HasSwitch(switches::kForceGpuRasterization); |
| 271 } | 271 } |
| 272 | 272 |
| 273 bool UseSurfacesEnabled() { | 273 bool UseSurfacesEnabled() { |
| 274 const base::CommandLine& command_line = | 274 const base::CommandLine& command_line = |
| 275 *base::CommandLine::ForCurrentProcess(); | 275 *base::CommandLine::ForCurrentProcess(); |
| 276 | 276 |
| 277 return command_line.HasSwitch(switches::kUseSurfaces); | 277 return command_line.HasSwitch(switches::kUseSurfaces); |
| 278 } | 278 } |
| 279 | 279 |
| 280 base::Value* GetFeatureStatus() { | 280 base::DictionaryValue* GetFeatureStatus() { |
| 281 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); | 281 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
| 282 std::string gpu_access_blocked_reason; | 282 std::string gpu_access_blocked_reason; |
| 283 bool gpu_access_blocked = | 283 bool gpu_access_blocked = |
| 284 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); | 284 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); |
| 285 | 285 |
| 286 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); | 286 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); |
| 287 | 287 |
| 288 bool eof = false; | 288 bool eof = false; |
| 289 for (size_t i = 0; !eof; ++i) { | 289 for (size_t i = 0; !eof; ++i) { |
| 290 const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); | 290 const GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfo(i, &eof); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 base::ListValue* disabled_features = new base::ListValue(); | 367 base::ListValue* disabled_features = new base::ListValue(); |
| 368 disabled_features->AppendString(gpu_feature_info.name); | 368 disabled_features->AppendString(gpu_feature_info.name); |
| 369 problem->Set("affectedGpuSettings", disabled_features); | 369 problem->Set("affectedGpuSettings", disabled_features); |
| 370 problem->SetString("tag", "disabledFeatures"); | 370 problem->SetString("tag", "disabledFeatures"); |
| 371 problem_list->Append(problem); | 371 problem_list->Append(problem); |
| 372 } | 372 } |
| 373 } | 373 } |
| 374 return problem_list; | 374 return problem_list; |
| 375 } | 375 } |
| 376 | 376 |
| 377 base::Value* GetDriverBugWorkarounds() { | 377 std::vector<std::string> GetDriverBugWorkarounds() { |
| 378 base::ListValue* workaround_list = new base::ListValue(); | 378 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 379 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | |
| 380 return workaround_list; | |
| 381 } | 379 } |
| 382 | 380 |
| 383 } // namespace content | 381 } // namespace content |
| OLD | NEW |