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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
8 | 8 |
9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 ShallowFlushCHROMIUM(); | 429 ShallowFlushCHROMIUM(); |
430 } | 430 } |
431 } | 431 } |
432 | 432 |
433 bool GLES2Implementation::OnMemoryDump( | 433 bool GLES2Implementation::OnMemoryDump( |
434 const base::trace_event::MemoryDumpArgs& args, | 434 const base::trace_event::MemoryDumpArgs& args, |
435 base::trace_event::ProcessMemoryDump* pmd) { | 435 base::trace_event::ProcessMemoryDump* pmd) { |
436 using base::trace_event::MemoryAllocatorDump; | 436 using base::trace_event::MemoryAllocatorDump; |
437 using base::trace_event::MemoryDumpLevelOfDetail; | 437 using base::trace_event::MemoryDumpLevelOfDetail; |
438 | 438 |
| 439 // Dump owned MappedMemoryManager memory as well. |
| 440 mapped_memory_->OnMemoryDump(args, pmd); |
| 441 |
439 if (!transfer_buffer_->HaveBuffer()) | 442 if (!transfer_buffer_->HaveBuffer()) |
440 return true; | 443 return true; |
441 | 444 |
442 const uint64_t tracing_process_id = | 445 const uint64_t tracing_process_id = |
443 base::trace_event::MemoryDumpManager::GetInstance() | 446 base::trace_event::MemoryDumpManager::GetInstance() |
444 ->GetTracingProcessId(); | 447 ->GetTracingProcessId(); |
445 | 448 |
446 MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(base::StringPrintf( | 449 MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(base::StringPrintf( |
447 "gpu/transfer_buffer_memory/buffer_%d", transfer_buffer_->GetShmId())); | 450 "gpu/transfer_buffer_memory/buffer_%d", transfer_buffer_->GetShmId())); |
448 dump->AddScalar(MemoryAllocatorDump::kNameSize, | 451 dump->AddScalar(MemoryAllocatorDump::kNameSize, |
(...skipping 6613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7062 CheckGLError(); | 7065 CheckGLError(); |
7063 } | 7066 } |
7064 | 7067 |
7065 // Include the auto-generated part of this file. We split this because it means | 7068 // Include the auto-generated part of this file. We split this because it means |
7066 // we can easily edit the non-auto generated parts right here in this file | 7069 // we can easily edit the non-auto generated parts right here in this file |
7067 // instead of having to edit some template or the code generator. | 7070 // instead of having to edit some template or the code generator. |
7068 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 7071 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
7069 | 7072 |
7070 } // namespace gles2 | 7073 } // namespace gles2 |
7071 } // namespace gpu | 7074 } // namespace gpu |
OLD | NEW |