| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace | 160 } // namespace |
| 161 | 161 |
| 162 bool IsPropertyTreeVerificationEnabled() { | 162 bool IsPropertyTreeVerificationEnabled() { |
| 163 const base::CommandLine& command_line = | 163 const base::CommandLine& command_line = |
| 164 *base::CommandLine::ForCurrentProcess(); | 164 *base::CommandLine::ForCurrentProcess(); |
| 165 return command_line.HasSwitch(cc::switches::kEnablePropertyTreeVerification); | 165 return command_line.HasSwitch(cc::switches::kEnablePropertyTreeVerification); |
| 166 } | 166 } |
| 167 | 167 |
| 168 bool IsBlinkSynchronizedPaintingEnabled() { |
| 169 const base::CommandLine& command_line = |
| 170 *base::CommandLine::ForCurrentProcess(); |
| 171 return command_line.HasSwitch(switches::kEnableBlinkSynchronizedPainting); |
| 172 } |
| 173 |
| 168 int NumberOfRendererRasterThreads() { | 174 int NumberOfRendererRasterThreads() { |
| 169 int num_processors = base::SysInfo::NumberOfProcessors(); | 175 int num_processors = base::SysInfo::NumberOfProcessors(); |
| 170 | 176 |
| 171 #if defined(OS_ANDROID) | 177 #if defined(OS_ANDROID) |
| 172 // Android may report 6 to 8 CPUs for big.LITTLE configurations. | 178 // Android may report 6 to 8 CPUs for big.LITTLE configurations. |
| 173 // Limit the number of raster threads based on maximum of 4 big cores. | 179 // Limit the number of raster threads based on maximum of 4 big cores. |
| 174 num_processors = std::min(num_processors, 4); | 180 num_processors = std::min(num_processors, 4); |
| 175 #endif | 181 #endif |
| 176 | 182 |
| 177 int num_raster_threads = num_processors / 2; | 183 int num_raster_threads = num_processors / 2; |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 419 } |
| 414 } | 420 } |
| 415 return problem_list; | 421 return problem_list; |
| 416 } | 422 } |
| 417 | 423 |
| 418 std::vector<std::string> GetDriverBugWorkarounds() { | 424 std::vector<std::string> GetDriverBugWorkarounds() { |
| 419 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 425 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 420 } | 426 } |
| 421 | 427 |
| 422 } // namespace content | 428 } // namespace content |
| OLD | NEW |