summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authordmurph@chromium.org <dmurph@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 01:55:17 +0000
committerdmurph@chromium.org <dmurph@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-21 01:55:17 +0000
commitbf121c6968c737beb78c0dd82d545c218e6d08a0 (patch)
treee009c1a37a0e132130049a296dbec588ccf2631c /gpu
parent6386beaf6ee2fe044cffe112b6f466a7a706b590 (diff)
downloadchromium_src-bf121c6968c737beb78c0dd82d545c218e6d08a0.zip
chromium_src-bf121c6968c737beb78c0dd82d545c218e6d08a0.tar.gz
chromium_src-bf121c6968c737beb78c0dd82d545c218e6d08a0.tar.bz2
Fixed in-memory gpu program cache size flag interpretation
Review URL: https://chromiumcodereview.appspot.com/10860055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/service/memory_program_cache.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpu/command_buffer/service/memory_program_cache.cc b/gpu/command_buffer/service/memory_program_cache.cc
index 0d51d17..b888780 100644
--- a/gpu/command_buffer/service/memory_program_cache.cc
+++ b/gpu/command_buffer/service/memory_program_cache.cc
@@ -13,14 +13,14 @@
#include "ui/gl/gl_bindings.h"
namespace {
-size_t GetCacheSize() {
+size_t GetCacheSizeBytes() {
size_t size;
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kGpuProgramCacheSizeKb) &&
base::StringToSizeT(command_line->GetSwitchValueNative(
switches::kGpuProgramCacheSizeKb),
&size)) {
- return size;
+ return size * 1024;
}
return gpu::gles2::MemoryProgramCache::kDefaultMaxProgramCacheMemoryBytes;
}
@@ -30,7 +30,7 @@ namespace gpu {
namespace gles2 {
MemoryProgramCache::MemoryProgramCache()
- : max_size_bytes_(GetCacheSize()),
+ : max_size_bytes_(GetCacheSizeBytes()),
curr_size_bytes_(0) { }
MemoryProgramCache::MemoryProgramCache(const size_t max_cache_size_bytes)