OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
6 | 6 |
7 #include "base/atomic_sequence_num.h" | 7 #include "base/atomic_sequence_num.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 255 } |
256 | 256 |
257 void BrowserGpuMemoryBufferManager::SetDestructionSyncPoint( | 257 void BrowserGpuMemoryBufferManager::SetDestructionSyncPoint( |
258 gfx::GpuMemoryBuffer* buffer, | 258 gfx::GpuMemoryBuffer* buffer, |
259 uint32 sync_point) { | 259 uint32 sync_point) { |
260 static_cast<GpuMemoryBufferImpl*>(buffer) | 260 static_cast<GpuMemoryBufferImpl*>(buffer) |
261 ->set_destruction_sync_point(sync_point); | 261 ->set_destruction_sync_point(sync_point); |
262 } | 262 } |
263 | 263 |
264 bool BrowserGpuMemoryBufferManager::OnMemoryDump( | 264 bool BrowserGpuMemoryBufferManager::OnMemoryDump( |
| 265 const base::trace_event::MemoryDumpArgs& args, |
265 base::trace_event::ProcessMemoryDump* pmd) { | 266 base::trace_event::ProcessMemoryDump* pmd) { |
266 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 267 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
267 | 268 |
268 for (const auto& client : clients_) { | 269 for (const auto& client : clients_) { |
269 int client_id = client.first; | 270 int client_id = client.first; |
270 | 271 |
271 for (const auto& buffer : client.second) { | 272 for (const auto& buffer : client.second) { |
272 if (buffer.second.type == gfx::EMPTY_BUFFER) | 273 if (buffer.second.type == gfx::EMPTY_BUFFER) |
273 continue; | 274 continue; |
274 | 275 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 return gpu_client_tracing_id_; | 599 return gpu_client_tracing_id_; |
599 } | 600 } |
600 | 601 |
601 // In normal cases, |client_id| is a child process id, so we can perform | 602 // In normal cases, |client_id| is a child process id, so we can perform |
602 // the standard conversion. | 603 // the standard conversion. |
603 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( | 604 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( |
604 client_id); | 605 client_id); |
605 } | 606 } |
606 | 607 |
607 } // namespace content | 608 } // namespace content |
OLD | NEW |