| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 280 |
| 281 if (!IsImplSidePaintingEnabled()) | 281 if (!IsImplSidePaintingEnabled()) |
| 282 return false; | 282 return false; |
| 283 | 283 |
| 284 return command_line.HasSwitch(switches::kForceGpuRasterization); | 284 return command_line.HasSwitch(switches::kForceGpuRasterization); |
| 285 } | 285 } |
| 286 | 286 |
| 287 bool UseSurfacesEnabled() { | 287 bool UseSurfacesEnabled() { |
| 288 #if defined(OS_ANDROID) | 288 #if defined(OS_ANDROID) |
| 289 return false; | 289 return false; |
| 290 #else | 290 #endif |
| 291 bool enabled = false; |
| 292 #if (defined(USE_AURA) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) |
| 293 enabled = true; |
| 294 #endif |
| 295 |
| 291 const base::CommandLine& command_line = | 296 const base::CommandLine& command_line = |
| 292 *base::CommandLine::ForCurrentProcess(); | 297 *base::CommandLine::ForCurrentProcess(); |
| 293 | 298 |
| 294 return command_line.HasSwitch(switches::kUseSurfaces); | 299 // Flags override. |
| 295 #endif | 300 enabled |= command_line.HasSwitch(switches::kUseSurfaces); |
| 301 enabled &= !command_line.HasSwitch(switches::kDisableSurfaces); |
| 302 return enabled; |
| 296 } | 303 } |
| 297 | 304 |
| 298 base::DictionaryValue* GetFeatureStatus() { | 305 base::DictionaryValue* GetFeatureStatus() { |
| 299 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); | 306 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
| 300 std::string gpu_access_blocked_reason; | 307 std::string gpu_access_blocked_reason; |
| 301 bool gpu_access_blocked = | 308 bool gpu_access_blocked = |
| 302 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); | 309 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); |
| 303 | 310 |
| 304 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); | 311 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); |
| 305 | 312 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 397 } |
| 391 } | 398 } |
| 392 return problem_list; | 399 return problem_list; |
| 393 } | 400 } |
| 394 | 401 |
| 395 std::vector<std::string> GetDriverBugWorkarounds() { | 402 std::vector<std::string> GetDriverBugWorkarounds() { |
| 396 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 403 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 397 } | 404 } |
| 398 | 405 |
| 399 } // namespace content | 406 } // namespace content |
| OLD | NEW |