Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "gpu/command_buffer/service/gpu_preferences.h" | 5 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 6 | 6 |
| 7 #include "base/sys_info.h" | |
| 8 | |
| 7 namespace gpu { | 9 namespace gpu { |
| 8 | 10 |
| 9 GpuPreferences::GpuPreferences() { | 11 GpuPreferences::GpuPreferences() { |
| 12 // Set a lower cache limit for low-end devices. | |
| 13 if (base::SysInfo::IsLowEndDevice()) { | |
|
Ken Russell (switch to Gerrit)
2017/06/05 20:47:34
Please reference a different constant for low-end
ssid
2017/06/06 22:31:09
Done.
| |
| 14 gpu_program_cache_size = kDefaultMaxProgramCacheMemoryBytes / 2; | |
| 15 } else { | |
| 16 gpu_program_cache_size = kDefaultMaxProgramCacheMemoryBytes; | |
| 17 } | |
| 10 } | 18 } |
| 11 | 19 |
| 12 GpuPreferences::GpuPreferences(const GpuPreferences& other) = default; | 20 GpuPreferences::GpuPreferences(const GpuPreferences& other) = default; |
| 13 | 21 |
| 14 GpuPreferences::~GpuPreferences() {} | 22 GpuPreferences::~GpuPreferences() {} |
| 15 | 23 |
| 16 } // namespace gpu | 24 } // namespace gpu |
| OLD | NEW |