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

Side by Side Diff: content/common/gpu/gpu_memory_manager.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
« 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>
11 #include <map> 11 #include <map>
12 12
13 #include "base/cancelable_callback.h" 13 #include "base/cancelable_callback.h"
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "content/public/common/gpu_memory_stats.h"
20 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 19 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
21 #include "gpu/command_buffer/service/memory_tracking.h" 20 #include "gpu/command_buffer/service/memory_tracking.h"
22 21
22 namespace gpu {
23 struct VideoMemoryUsageStats;
24 }
25
23 namespace content { 26 namespace content {
24 27
25 class GpuChannelManager; 28 class GpuChannelManager;
26 class GpuMemoryTrackingGroup; 29 class GpuMemoryTrackingGroup;
27 30
28 class CONTENT_EXPORT GpuMemoryManager : 31 class CONTENT_EXPORT GpuMemoryManager :
29 public base::SupportsWeakPtr<GpuMemoryManager> { 32 public base::SupportsWeakPtr<GpuMemoryManager> {
30 public: 33 public:
31 explicit GpuMemoryManager(GpuChannelManager* channel_manager); 34 explicit GpuMemoryManager(GpuChannelManager* channel_manager);
32 ~GpuMemoryManager(); 35 ~GpuMemoryManager();
33 36
34 // Retrieve GPU Resource consumption statistics for the task manager 37 // Retrieve GPU Resource consumption statistics for the task manager
35 void GetVideoMemoryUsageStats( 38 void GetVideoMemoryUsageStats(
36 content::GPUVideoMemoryUsageStats* video_memory_usage_stats) const; 39 gpu::VideoMemoryUsageStats* video_memory_usage_stats) const;
37 40
38 GpuMemoryTrackingGroup* CreateTrackingGroup( 41 GpuMemoryTrackingGroup* CreateTrackingGroup(
39 base::ProcessId pid, gpu::gles2::MemoryTracker* memory_tracker); 42 base::ProcessId pid, gpu::gles2::MemoryTracker* memory_tracker);
40 43
41 uint64_t GetTrackerMemoryUsage(gpu::gles2::MemoryTracker* tracker) const; 44 uint64_t GetTrackerMemoryUsage(gpu::gles2::MemoryTracker* tracker) const;
42 45
43 private: 46 private:
44 friend class GpuMemoryManagerTest; 47 friend class GpuMemoryManagerTest;
45 friend class GpuMemoryTrackingGroup; 48 friend class GpuMemoryTrackingGroup;
46 friend class GpuMemoryManagerClientState; 49 friend class GpuMemoryManagerClientState;
(...skipping 22 matching lines...) Expand all
69 // The current total memory usage, and historical maximum memory usage 72 // The current total memory usage, and historical maximum memory usage
70 uint64_t bytes_allocated_current_; 73 uint64_t bytes_allocated_current_;
71 uint64_t bytes_allocated_historical_max_; 74 uint64_t bytes_allocated_historical_max_;
72 75
73 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager); 76 DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
74 }; 77 };
75 78
76 } // namespace content 79 } // namespace content
77 80
78 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_H_ 81 #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