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

Side by Side Diff: gpu/ipc/service/gpu_memory_manager.h

Issue 2310623002: Remove GPU memory UMAs (Closed)
Patch Set: Rebase Created 4 years, 3 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_test_common.cc ('k') | gpu/ipc/service/gpu_memory_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_ 5 #ifndef GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_
6 #define GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_ 6 #define GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 30 matching lines...) Expand all
41 uint64_t GetTrackerMemoryUsage(gles2::MemoryTracker* tracker) const; 41 uint64_t GetTrackerMemoryUsage(gles2::MemoryTracker* tracker) const;
42 42
43 private: 43 private:
44 friend class GpuMemoryManagerTest; 44 friend class GpuMemoryManagerTest;
45 friend class GpuMemoryTrackingGroup; 45 friend class GpuMemoryTrackingGroup;
46 friend class GpuMemoryManagerClientState; 46 friend class GpuMemoryManagerClientState;
47 47
48 typedef std::map<gles2::MemoryTracker*, GpuMemoryTrackingGroup*> 48 typedef std::map<gles2::MemoryTracker*, GpuMemoryTrackingGroup*>
49 TrackingGroupMap; 49 TrackingGroupMap;
50 50
51 // Send memory usage stats to the browser process.
52 void SendUmaStatsToHost();
53
54 // Get the current number of bytes allocated. 51 // Get the current number of bytes allocated.
55 uint64_t GetCurrentUsage() const { return bytes_allocated_current_; } 52 uint64_t GetCurrentUsage() const { return bytes_allocated_current_; }
56 53
57 // GpuMemoryTrackingGroup interface 54 // GpuMemoryTrackingGroup interface
58 void TrackMemoryAllocatedChange(GpuMemoryTrackingGroup* tracking_group, 55 void TrackMemoryAllocatedChange(GpuMemoryTrackingGroup* tracking_group,
59 uint64_t old_size, 56 uint64_t old_size,
60 uint64_t new_size); 57 uint64_t new_size);
61 void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group); 58 void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group);
62 bool EnsureGPUMemoryAvailable(uint64_t size_needed); 59 bool EnsureGPUMemoryAvailable(uint64_t size_needed);
63 60
64 GpuChannelManager* channel_manager_; 61 GpuChannelManager* channel_manager_;
65 62
66 // All context groups' tracking structures 63 // All context groups' tracking structures
67 TrackingGroupMap tracking_groups_; 64 TrackingGroupMap tracking_groups_;
68 65
69 // The current total memory usage, and historical maximum memory usage 66 // The current total memory usage, and historical maximum memory usage
70 uint64_t bytes_allocated_current_; 67 uint64_t bytes_allocated_current_;
71 uint64_t bytes_allocated_historical_max_;
72 68
73 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); 69 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
74 }; 70 };
75 71
76 } // namespace gpu 72 } // namespace gpu
77 73
78 #endif // GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_ 74 #endif // GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel_test_common.cc ('k') | gpu/ipc/service/gpu_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698