| 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 "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 return true; | 193 return true; |
| 194 #else | 194 #else |
| 195 return false; | 195 return false; |
| 196 #endif | 196 #endif |
| 197 } | 197 } |
| 198 | 198 |
| 199 bool IsDelegatedRendererEnabled() { | 199 bool IsDelegatedRendererEnabled() { |
| 200 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 200 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 201 bool enabled = false; | 201 bool enabled = false; |
| 202 | 202 |
| 203 #if defined(USE_AURA) | 203 #if defined(USE_AURA) || defined(OS_MACOSX) |
| 204 // Enable on Aura. | 204 // Enable on Aura and Mac. |
| 205 enabled = true; | 205 enabled = true; |
| 206 #endif | 206 #endif |
| 207 | 207 |
| 208 // Flags override. | 208 // Flags override. |
| 209 enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer); | 209 enabled |= command_line.HasSwitch(switches::kEnableDelegatedRenderer); |
| 210 enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer); | 210 enabled &= !command_line.HasSwitch(switches::kDisableDelegatedRenderer); |
| 211 | 211 |
| 212 // Needs compositing, and thread. | 212 // Needs compositing, and thread. |
| 213 if (enabled && !IsThreadedCompositingEnabled()) { | 213 if (enabled && !IsThreadedCompositingEnabled()) { |
| 214 enabled = false; | 214 enabled = false; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 return problem_list; | 360 return problem_list; |
| 361 } | 361 } |
| 362 | 362 |
| 363 base::Value* GetDriverBugWorkarounds() { | 363 base::Value* GetDriverBugWorkarounds() { |
| 364 base::ListValue* workaround_list = new base::ListValue(); | 364 base::ListValue* workaround_list = new base::ListValue(); |
| 365 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 365 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
| 366 return workaround_list; | 366 return workaround_list; |
| 367 } | 367 } |
| 368 | 368 |
| 369 } // namespace content | 369 } // namespace content |
| OLD | NEW |