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

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 task manager review 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..f24ac58560fc203161feedf2e9d399020a77ea61 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 GPUVidmem {
+ GPUVidmem();
+ ~GPUVidmem();
+ struct CONTENT_EXPORT GPUProcessVidmem {
+ GPUProcessVidmem();
+ ~GPUProcessVidmem();
+
+ // The bytes of GPU resources accessible by this process
+ size_t vidmem;
+
+ // 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,GPUProcessVidmem> ProcessMap;
+
+ // 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