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

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

Issue 10829092: Track memory consumption for decoder-internal resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/memory_tracking.h
diff --git a/gpu/command_buffer/service/memory_tracking.h b/gpu/command_buffer/service/memory_tracking.h
index 36653272ac5de315f41624186eef6bc5a4d8900c..db748e935cd812d4e33f8d6960208a2091193601 100644
--- a/gpu/command_buffer/service/memory_tracking.h
+++ b/gpu/command_buffer/service/memory_tracking.h
@@ -55,10 +55,16 @@ class MemoryTypeTracker {
}
has_updated_mem_represented_ = true;
last_updated_mem_represented_ = mem_represented;
- TRACE_COUNTER_ID1(trace_category_,
- trace_name_,
- memory_tracker_,
- last_updated_mem_represented_);
+ if (trace_category_ && trace_name_ && memory_tracker_) {
+ TRACE_COUNTER_ID1(trace_category_,
+ trace_name_,
+ memory_tracker_,
+ last_updated_mem_represented_);
+ }
+ }
+
+ size_t GetMemRepresented() const {
+ return last_updated_mem_represented_;
}
private:
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698