| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 using base::trace_event::MemoryAllocatorDump; | 443 using base::trace_event::MemoryAllocatorDump; |
| 444 using base::trace_event::MemoryDumpLevelOfDetail; | 444 using base::trace_event::MemoryDumpLevelOfDetail; |
| 445 | 445 |
| 446 // Dump owned MappedMemoryManager memory as well. | 446 // Dump owned MappedMemoryManager memory as well. |
| 447 mapped_memory_->OnMemoryDump(args, pmd); | 447 mapped_memory_->OnMemoryDump(args, pmd); |
| 448 | 448 |
| 449 if (!transfer_buffer_->HaveBuffer()) | 449 if (!transfer_buffer_->HaveBuffer()) |
| 450 return true; | 450 return true; |
| 451 | 451 |
| 452 const uint64_t tracing_process_id = | 452 const uint64_t tracing_process_id = |
| 453 base::trace_event::MemoryDumpManager::GetInstance() | 453 base::trace_event::MemoryDumpManager::GetInstance()->tracing_process_id(); |
| 454 ->GetTracingProcessId(); | |
| 455 | 454 |
| 456 MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(base::StringPrintf( | 455 MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(base::StringPrintf( |
| 457 "gpu/transfer_buffer_memory/buffer_%d", transfer_buffer_->GetShmId())); | 456 "gpu/transfer_buffer_memory/buffer_%d", transfer_buffer_->GetShmId())); |
| 458 dump->AddScalar(MemoryAllocatorDump::kNameSize, | 457 dump->AddScalar(MemoryAllocatorDump::kNameSize, |
| 459 MemoryAllocatorDump::kUnitsBytes, | 458 MemoryAllocatorDump::kUnitsBytes, |
| 460 transfer_buffer_->GetSize()); | 459 transfer_buffer_->GetSize()); |
| 461 | 460 |
| 462 if (args.level_of_detail != MemoryDumpLevelOfDetail::BACKGROUND) { | 461 if (args.level_of_detail != MemoryDumpLevelOfDetail::BACKGROUND) { |
| 463 dump->AddScalar("free_size", MemoryAllocatorDump::kUnitsBytes, | 462 dump->AddScalar("free_size", MemoryAllocatorDump::kUnitsBytes, |
| 464 transfer_buffer_->GetFreeSize()); | 463 transfer_buffer_->GetFreeSize()); |
| (...skipping 6558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7023 CheckGLError(); | 7022 CheckGLError(); |
| 7024 } | 7023 } |
| 7025 | 7024 |
| 7026 // Include the auto-generated part of this file. We split this because it means | 7025 // Include the auto-generated part of this file. We split this because it means |
| 7027 // we can easily edit the non-auto generated parts right here in this file | 7026 // we can easily edit the non-auto generated parts right here in this file |
| 7028 // instead of having to edit some template or the code generator. | 7027 // instead of having to edit some template or the code generator. |
| 7029 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" | 7028 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" |
| 7030 | 7029 |
| 7031 } // namespace gles2 | 7030 } // namespace gles2 |
| 7032 } // namespace gpu | 7031 } // namespace gpu |
| OLD | NEW |