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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 if (!base::StringToInt(string_value, &num_raster_threads)) { | 195 if (!base::StringToInt(string_value, &num_raster_threads)) { |
196 DLOG(WARNING) << "Failed to parse switch " << | 196 DLOG(WARNING) << "Failed to parse switch " << |
197 switches::kNumRasterThreads << ": " << string_value; | 197 switches::kNumRasterThreads << ": " << string_value; |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
201 return cc::MathUtil::ClampToRange(num_raster_threads, kMinRasterThreads, | 201 return cc::MathUtil::ClampToRange(num_raster_threads, kMinRasterThreads, |
202 kMaxRasterThreads); | 202 kMaxRasterThreads); |
203 } | 203 } |
204 | 204 |
| 205 bool UseSingleThreadForBackgroundRasterTasks() { |
| 206 const base::CommandLine& command_line = |
| 207 *base::CommandLine::ForCurrentProcess(); |
| 208 return command_line.HasSwitch( |
| 209 switches::kUseSingleThreadForBackgroundRasterTasks); |
| 210 } |
| 211 |
205 bool IsZeroCopyUploadEnabled() { | 212 bool IsZeroCopyUploadEnabled() { |
206 const base::CommandLine& command_line = | 213 const base::CommandLine& command_line = |
207 *base::CommandLine::ForCurrentProcess(); | 214 *base::CommandLine::ForCurrentProcess(); |
208 #if defined(OS_MACOSX) | 215 #if defined(OS_MACOSX) |
209 return !command_line.HasSwitch(switches::kDisableZeroCopy); | 216 return !command_line.HasSwitch(switches::kDisableZeroCopy); |
210 #else | 217 #else |
211 return command_line.HasSwitch(switches::kEnableZeroCopy); | 218 return command_line.HasSwitch(switches::kEnableZeroCopy); |
212 #endif | 219 #endif |
213 } | 220 } |
214 | 221 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 } | 421 } |
415 } | 422 } |
416 return problem_list; | 423 return problem_list; |
417 } | 424 } |
418 | 425 |
419 std::vector<std::string> GetDriverBugWorkarounds() { | 426 std::vector<std::string> GetDriverBugWorkarounds() { |
420 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 427 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
421 } | 428 } |
422 | 429 |
423 } // namespace content | 430 } // namespace content |
OLD | NEW |