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

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: review feedback Created 5 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: 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 c321416ee8f97a02c46ae5494537d0f573f21fb9..bb5f1fbf45660b813f4aab378b7be40d2cbdb9f7 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() override { return client_tracing_id_; }
petrcermak 2015/07/29 16:13:34 const?
ericrk 2015/07/29 18:46:46 Done.
+ int ClientId() override { return client_id_; }
petrcermak 2015/07/29 16:13:34 ditto
ericrk 2015/07/29 18:46:46 Done.
+
private:
~GpuCommandBufferMemoryTracker() override {}
scoped_ptr<GpuMemoryTrackingGroup> tracking_group_;
+ uint64_t client_tracing_id_;
petrcermak 2015/07/29 16:13:34 const?
ericrk 2015/07/29 18:46:46 Done.
+ int client_id_;
petrcermak 2015/07/29 16:13:34 ditto
ericrk 2015/07/29 18:46:46 Done.
DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferMemoryTracker);
};

Powered by Google App Engine
This is Rietveld 408576698