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

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

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 | « no previous file | gpu/command_buffer/service/gpu_preferences.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..40fe3d579b8e113c90a8fc482e30bf6e17b2c435 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,13 @@ 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;
+#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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698