| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 bool IsPinchVirtualViewportEnabled() { | 167 bool IsPinchVirtualViewportEnabled() { |
| 168 const base::CommandLine& command_line = | 168 const base::CommandLine& command_line = |
| 169 *base::CommandLine::ForCurrentProcess(); | 169 *base::CommandLine::ForCurrentProcess(); |
| 170 | 170 |
| 171 // Command line switches take precedence over platform default. | 171 // Command line switches take precedence over platform default. |
| 172 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport)) | 172 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport)) |
| 173 return false; | 173 return false; |
| 174 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) | 174 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) |
| 175 return true; | 175 return true; |
| 176 | 176 |
| 177 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | |
| 178 return true; | 177 return true; |
| 179 #else | |
| 180 return false; | |
| 181 #endif | |
| 182 } | 178 } |
| 183 | 179 |
| 184 bool IsDelegatedRendererEnabled() { | 180 bool IsDelegatedRendererEnabled() { |
| 185 const base::CommandLine& command_line = | 181 const base::CommandLine& command_line = |
| 186 *base::CommandLine::ForCurrentProcess(); | 182 *base::CommandLine::ForCurrentProcess(); |
| 187 bool enabled = false; | 183 bool enabled = false; |
| 188 | 184 |
| 189 #if defined(USE_AURA) || defined(OS_MACOSX) | 185 #if defined(USE_AURA) || defined(OS_MACOSX) |
| 190 // Enable on Aura and Mac. | 186 // Enable on Aura and Mac. |
| 191 enabled = true; | 187 enabled = true; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 } | 386 } |
| 391 } | 387 } |
| 392 return problem_list; | 388 return problem_list; |
| 393 } | 389 } |
| 394 | 390 |
| 395 std::vector<std::string> GetDriverBugWorkarounds() { | 391 std::vector<std::string> GetDriverBugWorkarounds() { |
| 396 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 392 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 397 } | 393 } |
| 398 | 394 |
| 399 } // namespace content | 395 } // namespace content |
| OLD | NEW |