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

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

Issue 2921653005: GLES ProgramCache listens to memory pressure (Closed)
Patch Set: . Created 3 years, 7 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..d132dcbb8c2c8eaf04c96adab5e96c35db3b1cca 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;
@@ -69,7 +71,11 @@ const int32_t kInvalidSharedMemoryId = -1;
const int32_t kCommandBufferSharedMemoryId = 4;
// The size to set for the program cache.
+#if !defined(OS_ANDROID)
const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024;
+#else
+const size_t kDefaultMaxProgramCacheMemoryBytes = 512 * 1024;
vmiura 2017/06/03 04:05:31 Have we done any study of typical program cache us
ssid 2017/06/05 19:42:45 I looked at sizes of program cache on different we
+#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/memory_program_cache.h » ('j') | gpu/command_buffer/service/memory_program_cache.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698