Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: gpu/command_buffer/service/gpu_preferences.cc

Issue 2921653005: GLES ProgramCache listens to memory pressure (Closed)
Patch Set: comments. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698