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

Unified Diff: gpu/command_buffer/service/context_group.h

Issue 10796096: Add tracing of all memory allocated in all contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add global memory usage tracking Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/context_group.h
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index 2f3eaf9631e76b7632a54d3663ea7d334e90ac81..09feaabc00582cce230abe6d337aae29aa8e2a9a 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -31,6 +31,7 @@ class RenderbufferManager;
class ProgramManager;
class ShaderManager;
class TextureManager;
+class MemoryTracker;
struct DisallowedFeatures;
// A Context Group helps manage multiple GLES2Decoders that share
@@ -41,6 +42,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
ContextGroup(
MailboxManager* mailbox_manager,
+ MemoryTracker* memory_tracker,
bool bind_generates_resource);
// This should only be called by GLES2Decoder. This must be paired with a
@@ -56,6 +58,10 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
return mailbox_manager_.get();
}
+ MemoryTracker* memory_tracker() const {
+ return memory_tracker_.get();
+ }
+
bool bind_generates_resource() {
return bind_generates_resource_;
}
@@ -134,6 +140,7 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
bool QueryGLFeatureU(GLenum pname, GLint min_required, uint32* v);
scoped_refptr<MailboxManager> mailbox_manager_;
+ scoped_refptr<MemoryTracker> memory_tracker_;
scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
// Whether or not this context is initialized.

Powered by Google App Engine
This is Rietveld 408576698