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

Unified Diff: gpu/command_buffer/common/constants.h

Issue 2921653005: GLES ProgramCache listens to memory pressure (Closed)
Patch Set: change limits. 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
Index: gpu/command_buffer/common/constants.h
diff --git a/gpu/command_buffer/common/constants.h b/gpu/command_buffer/common/constants.h
index 7b80a33651160f7f7609b136d40eda7e344069a4..70d0b4e345dc18541a0c0d5a508b53a08962c3fe 100644
--- a/gpu/command_buffer/common/constants.h
+++ b/gpu/command_buffer/common/constants.h
@@ -8,6 +8,8 @@
#include <stddef.h>
#include <stdint.h>
+#include "build/build_config.h"
+
namespace gpu {
typedef int32_t CommandBufferOffset;
@@ -68,8 +70,14 @@ const int32_t kInvalidSharedMemoryId = -1;
// Common Command Buffer shared memory transfer buffer ID.
const int32_t kCommandBufferSharedMemoryId = 4;
-// The size to set for the program cache.
+// The size to set for the program cache for default and low-end device cases.
+#if !defined(OS_ANDROID)
const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024;
+const size_t kLowEndMaxProgramCacheMemoryBytes = 6 * 1024 * 1024;
+#else
+const size_t kDefaultMaxProgramCacheMemoryBytes = 2 * 1024 * 1024;
+const size_t kLowEndMaxProgramCacheMemoryBytes = 512 * 1024;
+#endif
// Namespace used to separate various command buffer types.
enum CommandBufferNamespace : int8_t {
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_preferences.cc » ('j') | gpu/command_buffer/service/memory_program_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698