diff options
author | kaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 17:44:52 +0000 |
---|---|---|
committer | kaanb@chromium.org <kaanb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-25 17:44:52 +0000 |
commit | 07a850118282fa70f91a813f68f8d9c75a752c9e (patch) | |
tree | 8ed647b24741ba325fc1d6787238fe7668a44900 /gpu | |
parent | 7a291fec02aa63cc5d93c38c71c4d2f7ac446bca (diff) | |
download | chromium_src-07a850118282fa70f91a813f68f8d9c75a752c9e.zip chromium_src-07a850118282fa70f91a813f68f8d9c75a752c9e.tar.gz chromium_src-07a850118282fa70f91a813f68f8d9c75a752c9e.tar.bz2 |
gpu: [Android] Use 1MB as the MappedMemoryManager chunk size instead of 2MB for low-end devices.
Landing with notry since this change only affects Android and Android trybots are green.
NOTRY=true
BUG=297844
Review URL: https://chromiumcodereview.appspot.com/24445002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/client/gles2_implementation.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 0fde7d8..b312869 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -149,7 +149,13 @@ bool GLES2Implementation::Initialize( } mapped_memory_.reset(new MappedMemoryManager(helper_, mapped_memory_limit)); - mapped_memory_->set_chunk_size_multiple(2 * 1024 * 1024); + + unsigned chunk_size = 2 * 1024 * 1024; + if (mapped_memory_limit != kNoLimit) { + // Use smaller chunks if the client is very memory conscientious. + chunk_size = std::min(mapped_memory_limit / 2, chunk_size); + } + mapped_memory_->set_chunk_size_multiple(chunk_size); if (!QueryAndCacheStaticState()) return false; |