| 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 "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 if (enabled && | 262 if (enabled && |
| 263 (!IsForceCompositingModeEnabled() || !IsThreadedCompositingEnabled())) { | 263 (!IsForceCompositingModeEnabled() || !IsThreadedCompositingEnabled())) { |
| 264 enabled = false; | 264 enabled = false; |
| 265 LOG(ERROR) << "Disabling delegated-rendering because it needs " | 265 LOG(ERROR) << "Disabling delegated-rendering because it needs " |
| 266 << "force-compositing-mode and threaded-compositing."; | 266 << "force-compositing-mode and threaded-compositing."; |
| 267 } | 267 } |
| 268 | 268 |
| 269 return enabled; | 269 return enabled; |
| 270 } | 270 } |
| 271 | 271 |
| 272 bool IsDeadlineSchedulingEnabled() { | |
| 273 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | |
| 274 | |
| 275 // Default to enabled. | |
| 276 bool enabled = true; | |
| 277 | |
| 278 // Flags override. | |
| 279 enabled |= command_line.HasSwitch(switches::kEnableDeadlineScheduling); | |
| 280 enabled &= !command_line.HasSwitch(switches::kDisableDeadlineScheduling); | |
| 281 | |
| 282 return enabled; | |
| 283 } | |
| 284 | |
| 285 base::Value* GetFeatureStatus() { | 272 base::Value* GetFeatureStatus() { |
| 286 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 273 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 287 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); | 274 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
| 288 std::string gpu_access_blocked_reason; | 275 std::string gpu_access_blocked_reason; |
| 289 bool gpu_access_blocked = | 276 bool gpu_access_blocked = |
| 290 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); | 277 !manager->GpuAccessAllowed(&gpu_access_blocked_reason); |
| 291 | 278 |
| 292 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); | 279 base::DictionaryValue* feature_status_dict = new base::DictionaryValue(); |
| 293 | 280 |
| 294 bool eof = false; | 281 bool eof = false; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 return problem_list; | 376 return problem_list; |
| 390 } | 377 } |
| 391 | 378 |
| 392 base::Value* GetDriverBugWorkarounds() { | 379 base::Value* GetDriverBugWorkarounds() { |
| 393 base::ListValue* workaround_list = new base::ListValue(); | 380 base::ListValue* workaround_list = new base::ListValue(); |
| 394 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 381 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
| 395 return workaround_list; | 382 return workaround_list; |
| 396 } | 383 } |
| 397 | 384 |
| 398 } // namespace content | 385 } // namespace content |
| OLD | NEW |