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

Unified Diff: content/public/common/gpu_memory_stats.h

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « content/common/gpu/gpu_memory_uma_stats.h ('k') | extensions/common/stack_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/gpu_memory_stats.h
diff --git a/content/public/common/gpu_memory_stats.h b/content/public/common/gpu_memory_stats.h
index 09bda3fe52b9b9a7dd387d42719c60645efe0354..5a6337bc488f9523216037007e2a00a906d8b441 100644
--- a/content/public/common/gpu_memory_stats.h
+++ b/content/public/common/gpu_memory_stats.h
@@ -17,6 +17,8 @@
namespace content {
+// Note: we use uint64_t instead of size_t for byte count because this struct
+// is sent over IPC which could span 32 & 64 bit processes.
struct CONTENT_EXPORT GPUVideoMemoryUsageStats {
GPUVideoMemoryUsageStats();
~GPUVideoMemoryUsageStats();
@@ -26,7 +28,7 @@ struct CONTENT_EXPORT GPUVideoMemoryUsageStats {
~ProcessStats();
// The bytes of GPU resources accessible by this process
- uint32_t video_memory;
+ uint64_t video_memory;
// Set to true if this process' GPU resource count is inflated because
// it is counting other processes' resources (e.g, the GPU process has
@@ -39,10 +41,10 @@ struct CONTENT_EXPORT GPUVideoMemoryUsageStats {
ProcessMap process_map;
// The total amount of GPU memory allocated at the time of the request.
- uint32_t bytes_allocated;
+ uint64_t bytes_allocated;
// The maximum amount of GPU memory ever allocated at once.
- uint32_t bytes_allocated_historical_max;
+ uint64_t bytes_allocated_historical_max;
};
} // namespace content
« no previous file with comments | « content/common/gpu/gpu_memory_uma_stats.h ('k') | extensions/common/stack_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698