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

Side by Side Diff: content/public/common/gpu_memory_stats.h

Issue 1708783002: Mustash: move content::GPUVideoMemoryUsageStats to gpu::VideoMemoryUsageStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_COMMON_GPU_MEMORY_STATS_H_
6 #define CONTENT_PUBLIC_COMMON_GPU_MEMORY_STATS_H_
7
8 // Provides access to the GPU information for the system
9 // on which chrome is currently running.
10
11 #include <stddef.h>
12
13 #include <map>
14
15 #include "base/process/process.h"
16 #include "content/common/content_export.h"
17
18 namespace content {
19
20 // Note: we use uint64_t instead of size_t for byte count because this struct
21 // is sent over IPC which could span 32 & 64 bit processes.
22 struct CONTENT_EXPORT GPUVideoMemoryUsageStats {
23 GPUVideoMemoryUsageStats();
24 ~GPUVideoMemoryUsageStats();
25
26 struct CONTENT_EXPORT ProcessStats {
27 ProcessStats();
28 ~ProcessStats();
29
30 // The bytes of GPU resources accessible by this process
31 uint64_t video_memory;
32
33 // Set to true if this process' GPU resource count is inflated because
34 // it is counting other processes' resources (e.g, the GPU process has
35 // duplicate set to true because it is the aggregate of all processes)
36 bool has_duplicates;
37 };
38 typedef std::map<base::ProcessId, ProcessStats> ProcessMap;
39
40 // A map of processes to their GPU resource consumption
41 ProcessMap process_map;
42
43 // The total amount of GPU memory allocated at the time of the request.
44 uint64_t bytes_allocated;
45
46 // The maximum amount of GPU memory ever allocated at once.
47 uint64_t bytes_allocated_historical_max;
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_PUBLIC_COMMON_GPU_MEMORY_STATS_H_
OLDNEW
« no previous file with comments | « content/public/browser/gpu_data_manager_observer.h ('k') | content/public/common/gpu_memory_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698