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

Unified Diff: gpu/command_buffer/service/gpu_preferences.cc

Issue 2921653005: GLES ProgramCache listens to memory pressure (Closed)
Patch Set: low-end check only on Android. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/common/constants.h ('k') | gpu/command_buffer/service/memory_program_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_preferences.cc
diff --git a/gpu/command_buffer/service/gpu_preferences.cc b/gpu/command_buffer/service/gpu_preferences.cc
index 06bc6b41cb905b3b93b7bf2b919d9668adf47830..1b7983d64206c15d630e2b7286a3a962941c9139 100644
--- a/gpu/command_buffer/service/gpu_preferences.cc
+++ b/gpu/command_buffer/service/gpu_preferences.cc
@@ -4,9 +4,16 @@
#include "gpu/command_buffer/service/gpu_preferences.h"
+#include "base/sys_info.h"
+
namespace gpu {
GpuPreferences::GpuPreferences() {
+ gpu_program_cache_size = kDefaultMaxProgramCacheMemoryBytes;
+#if defined(OS_ANDROID)
+ if (base::SysInfo::IsLowEndDevice())
+ gpu_program_cache_size = kLowEndMaxProgramCacheMemoryBytes;
+#endif
}
GpuPreferences::GpuPreferences(const GpuPreferences& other) = default;
« no previous file with comments | « gpu/command_buffer/common/constants.h ('k') | gpu/command_buffer/service/memory_program_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698