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 <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 DCHECK(index < arraysize(kGpuFeatureInfo)); | 154 DCHECK(index < arraysize(kGpuFeatureInfo)); |
155 *eof = (index == arraysize(kGpuFeatureInfo) - 1); | 155 *eof = (index == arraysize(kGpuFeatureInfo) - 1); |
156 return kGpuFeatureInfo[index]; | 156 return kGpuFeatureInfo[index]; |
157 } | 157 } |
158 | 158 |
159 } // namespace | 159 } // namespace |
160 | 160 |
161 int NumberOfRendererRasterThreads() { | 161 int NumberOfRendererRasterThreads() { |
162 int num_processors = base::SysInfo::NumberOfProcessors(); | 162 int num_processors = base::SysInfo::NumberOfProcessors(); |
163 | 163 |
164 #if defined(OS_ANDROID) | 164 #if defined(OS_ANDROID) || \ |
165 // Android may report 6 to 8 CPUs for big.LITTLE configurations. | 165 (defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)) |
166 // Limit the number of raster threads based on maximum of 4 big cores. | 166 // Android and ChromeOS ARM devices may report 6 to 8 CPUs for big.LITTLE |
| 167 // configurations. Limit the number of raster threads based on maximum of |
| 168 // 4 big cores. |
167 num_processors = std::min(num_processors, 4); | 169 num_processors = std::min(num_processors, 4); |
168 #endif | 170 #endif |
169 | 171 |
170 int num_raster_threads = num_processors / 2; | 172 int num_raster_threads = num_processors / 2; |
171 | 173 |
172 #if defined(OS_ANDROID) | 174 #if defined(OS_ANDROID) |
173 // Limit the number of raster threads to 1 on Android. | 175 // Limit the number of raster threads to 1 on Android. |
174 // TODO(reveman): Remove this when we have a better mechanims to prevent | 176 // TODO(reveman): Remove this when we have a better mechanims to prevent |
175 // pre-paint raster work from slowing down non-raster work. crbug.com/504515 | 177 // pre-paint raster work from slowing down non-raster work. crbug.com/504515 |
176 num_raster_threads = 1; | 178 num_raster_threads = 1; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 408 } |
407 } | 409 } |
408 return problem_list; | 410 return problem_list; |
409 } | 411 } |
410 | 412 |
411 std::vector<std::string> GetDriverBugWorkarounds() { | 413 std::vector<std::string> GetDriverBugWorkarounds() { |
412 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 414 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
413 } | 415 } |
414 | 416 |
415 } // namespace content | 417 } // namespace content |
OLD | NEW |