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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 if (IsZeroCopyUploadEnabled()) | 226 if (IsZeroCopyUploadEnabled()) |
227 return false; | 227 return false; |
228 | 228 |
229 const base::CommandLine& command_line = | 229 const base::CommandLine& command_line = |
230 *base::CommandLine::ForCurrentProcess(); | 230 *base::CommandLine::ForCurrentProcess(); |
231 if (command_line.HasSwitch(switches::kEnableOneCopy)) | 231 if (command_line.HasSwitch(switches::kEnableOneCopy)) |
232 return true; | 232 return true; |
233 if (command_line.HasSwitch(switches::kDisableOneCopy)) | 233 if (command_line.HasSwitch(switches::kDisableOneCopy)) |
234 return false; | 234 return false; |
235 | 235 |
236 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 236 #if defined(OS_ANDROID) |
237 return false; | 237 return false; |
238 #endif | 238 #endif |
239 return true; | 239 return true; |
240 } | 240 } |
241 | 241 |
242 bool IsZeroCopyUploadEnabled() { | 242 bool IsZeroCopyUploadEnabled() { |
243 const base::CommandLine& command_line = | 243 const base::CommandLine& command_line = |
244 *base::CommandLine::ForCurrentProcess(); | 244 *base::CommandLine::ForCurrentProcess(); |
245 return command_line.HasSwitch(switches::kEnableZeroCopy); | 245 return command_line.HasSwitch(switches::kEnableZeroCopy); |
246 } | 246 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 400 } |
401 } | 401 } |
402 return problem_list; | 402 return problem_list; |
403 } | 403 } |
404 | 404 |
405 std::vector<std::string> GetDriverBugWorkarounds() { | 405 std::vector<std::string> GetDriverBugWorkarounds() { |
406 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 406 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
407 } | 407 } |
408 | 408 |
409 } // namespace content | 409 } // namespace content |
OLD | NEW |