| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 bool IsPinchVirtualViewportEnabled() { | 166 bool IsPinchVirtualViewportEnabled() { |
| 167 const base::CommandLine& command_line = | 167 const base::CommandLine& command_line = |
| 168 *base::CommandLine::ForCurrentProcess(); | 168 *base::CommandLine::ForCurrentProcess(); |
| 169 | 169 |
| 170 // Command line switches take precedence over platform default. | 170 // Command line switches take precedence over platform default. |
| 171 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport)) | 171 if (command_line.HasSwitch(cc::switches::kDisablePinchVirtualViewport)) |
| 172 return false; | 172 return false; |
| 173 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) | 173 if (command_line.HasSwitch(cc::switches::kEnablePinchVirtualViewport)) |
| 174 return true; | 174 return true; |
| 175 | 175 |
| 176 #if defined(OS_CHROMEOS) |
| 176 return true; | 177 return true; |
| 178 #else |
| 179 return false; |
| 180 #endif |
| 177 } | 181 } |
| 178 | 182 |
| 179 bool IsDelegatedRendererEnabled() { | 183 bool IsDelegatedRendererEnabled() { |
| 180 const base::CommandLine& command_line = | 184 const base::CommandLine& command_line = |
| 181 *base::CommandLine::ForCurrentProcess(); | 185 *base::CommandLine::ForCurrentProcess(); |
| 182 bool enabled = false; | 186 bool enabled = false; |
| 183 | 187 |
| 184 #if defined(USE_AURA) || defined(OS_MACOSX) | 188 #if defined(USE_AURA) || defined(OS_MACOSX) |
| 185 // Enable on Aura and Mac. | 189 // Enable on Aura and Mac. |
| 186 enabled = true; | 190 enabled = true; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 return problem_list; | 371 return problem_list; |
| 368 } | 372 } |
| 369 | 373 |
| 370 base::Value* GetDriverBugWorkarounds() { | 374 base::Value* GetDriverBugWorkarounds() { |
| 371 base::ListValue* workaround_list = new base::ListValue(); | 375 base::ListValue* workaround_list = new base::ListValue(); |
| 372 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 376 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
| 373 return workaround_list; | 377 return workaround_list; |
| 374 } | 378 } |
| 375 | 379 |
| 376 } // namespace content | 380 } // namespace content |
| OLD | NEW |