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 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
177 return true; | 177 return true; |
178 #else | 178 #else |
179 return false; | 179 return false; |
180 #endif | 180 #endif |
181 } | 181 } |
182 | 182 |
183 bool IsDelegatedRendererEnabled() { | 183 bool IsDelegatedRendererEnabled() { |
184 const base::CommandLine& command_line = | 184 const base::CommandLine& command_line = |
185 *base::CommandLine::ForCurrentProcess(); | 185 *base::CommandLine::ForCurrentProcess(); |
186 bool enabled = false; | 186 bool enabled = false; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 return problem_list; | 371 return problem_list; |
372 } | 372 } |
373 | 373 |
374 base::Value* GetDriverBugWorkarounds() { | 374 base::Value* GetDriverBugWorkarounds() { |
375 base::ListValue* workaround_list = new base::ListValue(); | 375 base::ListValue* workaround_list = new base::ListValue(); |
376 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); | 376 GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(workaround_list); |
377 return workaround_list; | 377 return workaround_list; |
378 } | 378 } |
379 | 379 |
380 } // namespace content | 380 } // namespace content |
OLD | NEW |