Commit a5822b8a by Jamie Madill Committed by Commit Bot

Temporarily disable the GPU program cache.

We should give the app layer more control over the cache before we enable it, to save on memory usage in Chrome. BUG=angleproject:1897 Change-Id: I532c05c3042cb0a2d9c62f362f25d6064042ca2c Reviewed-on: https://chromium-review.googlesource.com/558370 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 27a60631
...@@ -15,12 +15,15 @@ namespace gl ...@@ -15,12 +15,15 @@ namespace gl
{ {
// The size to set for the program cache for default and low-end device cases. // The size to set for the program cache for default and low-end device cases.
#if !defined(ANGLE_PLATFORM_ANDROID) // Temporarily disabled to prevent double memory use in Chrome.
const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024; // TODO(jmadill): Re-enable once we have memory cache control.
#else //#if !defined(ANGLE_PLATFORM_ANDROID)
const size_t kDefaultMaxProgramCacheMemoryBytes = 2 * 1024 * 1024; // const size_t kDefaultMaxProgramCacheMemoryBytes = 6 * 1024 * 1024;
const size_t kLowEndMaxProgramCacheMemoryBytes = 512 * 1024; //#else
#endif // const size_t kDefaultMaxProgramCacheMemoryBytes = 2 * 1024 * 1024;
// const size_t kLowEndMaxProgramCacheMemoryBytes = 512 * 1024;
//#endif
const size_t kDefaultMaxProgramCacheMemoryBytes = 0;
enum enum
{ {
......
...@@ -741,9 +741,11 @@ Error Display::createContext(const Config *configuration, ...@@ -741,9 +741,11 @@ Error Display::createContext(const Config *configuration,
shareTextures = mTextureManager; shareTextures = mTextureManager;
} }
gl::Context *context = new gl::Context(mImplementation, configuration, shareContext, // Memory cache temporarily disabled to prevent double memory use in Chrome.
shareTextures, &mMemoryProgramCache, attribs, // TODO(jmadill): Re-enable once we have memory cache control.
mDisplayExtensions, isRobustResourceInitEnabled()); gl::Context *context =
new gl::Context(mImplementation, configuration, shareContext, shareTextures, nullptr,
attribs, mDisplayExtensions, isRobustResourceInitEnabled());
ASSERT(context != nullptr); ASSERT(context != nullptr);
mContextSet.insert(context); mContextSet.insert(context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment