summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 09:42:53 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 09:42:53 +0000
commitc62a5e2cc0dfdbf6fc42d6c93322764dbc3001be (patch)
tree032ca2b7cd9cd1f1c5ec96d81f81ba26770a4d7c /content/common
parent7da0f76c8e5c659f36d20de2b16ffdd70d4391a7 (diff)
downloadchromium_src-c62a5e2cc0dfdbf6fc42d6c93322764dbc3001be.zip
chromium_src-c62a5e2cc0dfdbf6fc42d6c93322764dbc3001be.tar.gz
chromium_src-c62a5e2cc0dfdbf6fc42d6c93322764dbc3001be.tar.bz2
Add a pass/fail test to verify that GPU memory usage doesn't grow beyond an acceptable level when using CSS (managed memory) and WebGL (unmanaged memory).
BUG=135525 Review URL: https://chromiumcodereview.appspot.com/11667030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/gpu/gpu_memory_manager.cc4
-rw-r--r--content/common/gpu/gpu_messages.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 2f80bd0..c25414b 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -421,6 +421,10 @@ void GpuMemoryManager::GetVideoMemoryUsageStats(
base::GetCurrentProcId()].video_memory = GetCurrentUsage();
video_memory_usage_stats->process_map[
base::GetCurrentProcId()].has_duplicates = true;
+
+ video_memory_usage_stats->bytes_allocated = GetCurrentUsage();
+ video_memory_usage_stats->bytes_allocated_historical_max =
+ bytes_allocated_historical_max_;
}
void GpuMemoryManager::SetWindowCount(uint32 window_count) {
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index 00e421d..b9558cc 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -162,6 +162,8 @@ IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats)
IPC_STRUCT_TRAITS_MEMBER(process_map)
+ IPC_STRUCT_TRAITS_MEMBER(bytes_allocated)
+ IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats)