OLD | NEW |
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 #include "gpu/command_buffer/service/renderbuffer_manager.h" | 5 #include "gpu/command_buffer/service/renderbuffer_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 std::string dump_name = | 258 std::string dump_name = |
259 base::StringPrintf("gpu/gl/renderbuffers/client_%d/renderbuffer_%d", | 259 base::StringPrintf("gpu/gl/renderbuffers/client_%d/renderbuffer_%d", |
260 client_id, client_renderbuffer_id); | 260 client_id, client_renderbuffer_id); |
261 base::trace_event::MemoryAllocatorDump* dump = | 261 base::trace_event::MemoryAllocatorDump* dump = |
262 pmd->CreateAllocatorDump(dump_name); | 262 pmd->CreateAllocatorDump(dump_name); |
263 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, | 263 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
264 base::trace_event::MemoryAllocatorDump::kUnitsBytes, | 264 base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
265 static_cast<uint64_t>(renderbuffer->EstimatedSize())); | 265 static_cast<uint64_t>(renderbuffer->EstimatedSize())); |
266 | 266 |
267 auto guid = gfx::GetGLRenderbufferGUIDForTracing( | 267 auto guid = gl::GetGLRenderbufferGUIDForTracing( |
268 memory_tracker_->ShareGroupTracingGUID(), client_renderbuffer_id); | 268 memory_tracker_->ShareGroupTracingGUID(), client_renderbuffer_id); |
269 pmd->CreateSharedGlobalAllocatorDump(guid); | 269 pmd->CreateSharedGlobalAllocatorDump(guid); |
270 pmd->AddOwnershipEdge(dump->guid(), guid); | 270 pmd->AddOwnershipEdge(dump->guid(), guid); |
271 } | 271 } |
272 return true; | 272 return true; |
273 } | 273 } |
274 | 274 |
275 } // namespace gles2 | 275 } // namespace gles2 |
276 } // namespace gpu | 276 } // namespace gpu |
OLD | NEW |