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