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

Side by Side Diff: gpu/command_buffer/service/memory_tracking.h

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: review feedback Created 5 years, 4 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
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_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 12 matching lines...) Expand all
23 kManaged 23 kManaged
24 }; 24 };
25 25
26 virtual void TrackMemoryAllocatedChange(size_t old_size, 26 virtual void TrackMemoryAllocatedChange(size_t old_size,
27 size_t new_size, 27 size_t new_size,
28 Pool pool) = 0; 28 Pool pool) = 0;
29 29
30 // Ensure a certain amount of GPU memory is free. Returns true on success. 30 // Ensure a certain amount of GPU memory is free. Returns true on success.
31 virtual bool EnsureGPUMemoryAvailable(size_t size_needed) = 0; 31 virtual bool EnsureGPUMemoryAvailable(size_t size_needed) = 0;
32 32
33 // Tracing id which identifies the GPU client for whom memory is being
34 // allocated.
35 virtual uint64_t ClientTracingId() = 0;
petrcermak 2015/07/29 16:13:35 I think this should be const.
ericrk 2015/07/29 18:46:47 Done.
36
37 // Raw ID identifying the GPU client for whom memory is being allocated.
38 virtual int ClientId() = 0;
petrcermak 2015/07/29 16:13:35 ditto
ericrk 2015/07/29 18:46:46 Done.
39
33 protected: 40 protected:
34 friend class base::RefCounted<MemoryTracker>; 41 friend class base::RefCounted<MemoryTracker>;
35 MemoryTracker() {} 42 MemoryTracker() {}
36 virtual ~MemoryTracker() {}; 43 virtual ~MemoryTracker() {};
37 44
38 private: 45 private:
39 DISALLOW_COPY_AND_ASSIGN(MemoryTracker); 46 DISALLOW_COPY_AND_ASSIGN(MemoryTracker);
40 }; 47 };
41 48
42 // A MemoryTypeTracker tracks the use of a particular type of memory (buffer, 49 // A MemoryTypeTracker tracks the use of a particular type of memory (buffer,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 size_t mem_represented_; 110 size_t mem_represented_;
104 size_t mem_represented_at_last_update_; 111 size_t mem_represented_at_last_update_;
105 112
106 DISALLOW_COPY_AND_ASSIGN(MemoryTypeTracker); 113 DISALLOW_COPY_AND_ASSIGN(MemoryTypeTracker);
107 }; 114 };
108 115
109 } // namespace gles2 116 } // namespace gles2
110 } // namespace gpu 117 } // namespace gpu
111 118
112 #endif // GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_ 119 #endif // GPU_COMMAND_BUFFER_SERVICE_MEMORY_TRACKING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698