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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: Key texture manager memory dump provider registration off of memory_tracker_ 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 905a15481a4f0baf6fda08d13179fdc173ee5791..f1cbfd7ec99760af3f7c2b0d7afc0aa1abfc4be5 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -64,10 +64,13 @@ namespace {
// ContextGroup's memory type managers and the GpuMemoryManager class.
class GpuCommandBufferMemoryTracker : public gpu::gles2::MemoryTracker {
public:
- explicit GpuCommandBufferMemoryTracker(GpuChannel* channel) :
- tracking_group_(channel->gpu_channel_manager()->gpu_memory_manager()->
- CreateTrackingGroup(channel->renderer_pid(), this)) {
- }
+ explicit GpuCommandBufferMemoryTracker(GpuChannel* channel)
+ : tracking_group_(
+ channel->gpu_channel_manager()
+ ->gpu_memory_manager()
+ ->CreateTrackingGroup(channel->renderer_pid(), this)),
+ client_tracing_id_(channel->client_tracing_id()),
+ client_id_(channel->client_id()) {}
void TrackMemoryAllocatedChange(
size_t old_size,
@@ -81,9 +84,14 @@ class GpuCommandBufferMemoryTracker : public gpu::gles2::MemoryTracker {
return tracking_group_->EnsureGPUMemoryAvailable(size_needed);
};
+ uint64_t ClientTracingId() const override { return client_tracing_id_; }
+ int ClientId() const override { return client_id_; }
+
private:
~GpuCommandBufferMemoryTracker() override {}
scoped_ptr<GpuMemoryTrackingGroup> tracking_group_;
+ const uint64_t client_tracing_id_;
+ const int client_id_;
DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferMemoryTracker);
};

Powered by Google App Engine
This is Rietveld 408576698