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

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

Issue 10854076: Add GPU memory tab to the task manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate taskman feedback Created 8 years, 4 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
Index: content/public/common/gpu_info.h
diff --git a/content/public/common/gpu_info.h b/content/public/common/gpu_info.h
index 5a01e182482e5c410dc554cd0a86ef670e8b4818..afea3a7b0ea488738e0f30570f9c6ae7e05b0bed 100644
--- a/content/public/common/gpu_info.h
+++ b/content/public/common/gpu_info.h
@@ -8,10 +8,12 @@
// Provides access to the GPU information for the system
// on which chrome is currently running.
+#include <map>
#include <string>
#include <vector>
#include "base/basictypes.h"
+#include "base/process.h"
#include "base/time.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
@@ -110,6 +112,27 @@ struct CONTENT_EXPORT GPUInfo {
#endif
};
+struct CONTENT_EXPORT GPUVidmemUsageStats {
jam 2012/08/17 18:31:05 put this in a separate file (the convention in the
jam 2012/08/17 18:31:05 nit: also VideoMemory per the style guide
ccameron 2012/08/17 20:52:55 Moved to gpu_memory_stats.h
ccameron 2012/08/17 20:52:55 Changed this everywhere in the patch.
+ GPUVidmemUsageStats();
+ ~GPUVidmemUsageStats();
brettw 2012/08/17 19:07:24 I'd do a blank line after this.
ccameron 2012/08/17 20:52:55 Done.
+ struct CONTENT_EXPORT GPUProcessVidmemUsageStats {
brettw 2012/08/17 19:07:24 I might just call this something simpler like "Pro
ccameron 2012/08/17 20:52:55 Good idea, done.
+ GPUProcessVidmemUsageStats();
+ ~GPUProcessVidmemUsageStats();
+
+ // The bytes of GPU resources accessible by this process
+ size_t vidmem;
jam 2012/08/17 18:31:05 nit: video_memory, per the style guide
ccameron 2012/08/17 20:52:55 Changed this everywhere in the patch.
+
+ // Set to true if this process' GPU resource count is inflated because
+ // it is counting other processes' resources (e.g, the GPU process has
+ // duplicate set to true because it is the aggregate of all processes)
+ bool has_duplicates;
+ };
+ typedef std::map<base::ProcessId,GPUProcessVidmemUsageStats> ProcessMap;
jam 2012/08/17 18:31:05 nit: space after comma
ccameron 2012/08/17 20:52:55 Done.
+
+ // A map of processes to their GPU resource consumption
+ ProcessMap process_map;
+};
+
} // namespace content
#endif // CONTENT_PUBLIC_COMMON_GPU_INFO_H_

Powered by Google App Engine
This is Rietveld 408576698