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

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

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/common/gpu/gpu_messages.h » ('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_TRACKING_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_
6 #define CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_ 6 #define CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "content/common/gpu/gpu_memory_manager.h" 11 #include "content/common/gpu/gpu_memory_manager.h"
12 12
13 namespace content {
14
13 // All decoders in a context group point to a single GpuMemoryTrackingGroup, 15 // All decoders in a context group point to a single GpuMemoryTrackingGroup,
14 // which tracks GPU resource consumption for the entire context group. 16 // which tracks GPU resource consumption for the entire context group.
15 class GpuMemoryTrackingGroup { 17 class GpuMemoryTrackingGroup {
16 public: 18 public:
17 GpuMemoryTrackingGroup(base::ProcessId pid, GpuMemoryManager* memory_manager) 19 GpuMemoryTrackingGroup(base::ProcessId pid, GpuMemoryManager* memory_manager)
18 : pid_(pid), 20 : pid_(pid),
19 size_(0), 21 size_(0),
20 memory_manager_(memory_manager) { 22 memory_manager_(memory_manager) {
21 memory_manager_->AddTrackingGroup(this); 23 memory_manager_->AddTrackingGroup(this);
22 } 24 }
(...skipping 18 matching lines...) Expand all
41 size_t GetSize() const { 43 size_t GetSize() const {
42 return size_; 44 return size_;
43 } 45 }
44 46
45 private: 47 private:
46 base::ProcessId pid_; 48 base::ProcessId pid_;
47 size_t size_; 49 size_t size_;
48 GpuMemoryManager* memory_manager_; 50 GpuMemoryManager* memory_manager_;
49 }; 51 };
50 52
53 } // namespace content
54
51 #endif 55 #endif
52 56
53 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_ 57 #endif // CONTENT_COMMON_GPU_GPU_MEMORY_TRACKING_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698