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

Side by Side Diff: content/common/gpu/gpu_memory_manager.h

Issue 1730023004: Revert of Decouple browser-specific GPU IPC messages from GPU service IPCs (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 unified diff | Download patch
« no previous file with comments | « content/common/gpu/gpu_host_messages.h ('k') | content/common/gpu/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 CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<gpu::gles2::MemoryTracker*, GpuMemoryTrackingGroup*> 48 typedef std::map<gpu::gles2::MemoryTracker*, GpuMemoryTrackingGroup*>
49 TrackingGroupMap; 49 TrackingGroupMap;
50 50
51 // Send memory usage stats to the browser process. 51 // Send memory usage stats to the browser process.
52 void SendUmaStatsToHost(); 52 void SendUmaStatsToBrowser();
53 53
54 // Get the current number of bytes allocated. 54 // Get the current number of bytes allocated.
55 uint64_t GetCurrentUsage() const { return bytes_allocated_current_; } 55 uint64_t GetCurrentUsage() const { return bytes_allocated_current_; }
56 56
57 // GpuMemoryTrackingGroup interface 57 // GpuMemoryTrackingGroup interface
58 void TrackMemoryAllocatedChange(GpuMemoryTrackingGroup* tracking_group, 58 void TrackMemoryAllocatedChange(GpuMemoryTrackingGroup* tracking_group,
59 uint64_t old_size, 59 uint64_t old_size,
60 uint64_t new_size); 60 uint64_t new_size);
61 void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group); 61 void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group);
62 bool EnsureGPUMemoryAvailable(uint64_t size_needed); 62 bool EnsureGPUMemoryAvailable(uint64_t size_needed);
63 63
64 GpuChannelManager* channel_manager_; 64 GpuChannelManager* channel_manager_;
65 65
66 // All context groups' tracking structures 66 // All context groups' tracking structures
67 TrackingGroupMap tracking_groups_; 67 TrackingGroupMap tracking_groups_;
68 68
69 // The current total memory usage, and historical maximum memory usage 69 // The current total memory usage, and historical maximum memory usage
70 uint64_t bytes_allocated_current_; 70 uint64_t bytes_allocated_current_;
71 uint64_t bytes_allocated_historical_max_; 71 uint64_t bytes_allocated_historical_max_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); 73 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
74 }; 74 };
75 75
76 } // namespace content 76 } // namespace content
77 77
78 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 78 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_host_messages.h ('k') | content/common/gpu/gpu_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698