| 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 gpu_program_cache_size = kDefaultMaxProgramCacheMemoryBytes; |
| 13 #if defined(OS_ANDROID) |
| 14 if (base::SysInfo::IsLowEndDevice()) |
| 15 gpu_program_cache_size = kLowEndMaxProgramCacheMemoryBytes; |
| 16 #endif |
| 10 } | 17 } |
| 11 | 18 |
| 12 GpuPreferences::GpuPreferences(const GpuPreferences& other) = default; | 19 GpuPreferences::GpuPreferences(const GpuPreferences& other) = default; |
| 13 | 20 |
| 14 GpuPreferences::~GpuPreferences() {} | 21 GpuPreferences::~GpuPreferences() {} |
| 15 | 22 |
| 16 } // namespace gpu | 23 } // namespace gpu |
| OLD | NEW |