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 #if defined(OS_WIN) | 5 #if defined(OS_WIN) |
6 #include <windows.h> | 6 #include <windows.h> |
7 #endif | 7 #endif |
8 | 8 |
9 #include "content/common/gpu/gpu_channel.h" | 9 #include "content/common/gpu/gpu_channel.h" |
10 | 10 |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 client_id_); | 891 client_id_); |
892 } | 892 } |
893 } | 893 } |
894 } | 894 } |
895 | 895 |
896 void GpuChannel::HandleUpdateValueState( | 896 void GpuChannel::HandleUpdateValueState( |
897 unsigned int target, const gpu::ValueState& state) { | 897 unsigned int target, const gpu::ValueState& state) { |
898 pending_valuebuffer_state_->UpdateState(target, state); | 898 pending_valuebuffer_state_->UpdateState(target, state); |
899 } | 899 } |
900 | 900 |
901 bool GpuChannel::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { | 901 bool GpuChannel::OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, |
| 902 base::trace_event::ProcessMemoryDump* pmd) { |
902 auto dump_name = GetChannelName(); | 903 auto dump_name = GetChannelName(); |
903 std::replace(dump_name.begin(), dump_name.end(), '.', '_'); | 904 std::replace(dump_name.begin(), dump_name.end(), '.', '_'); |
904 | 905 |
905 base::trace_event::MemoryAllocatorDump* dump = | 906 base::trace_event::MemoryAllocatorDump* dump = |
906 pmd->CreateAllocatorDump(base::StringPrintf("gl/%s", dump_name.c_str())); | 907 pmd->CreateAllocatorDump(base::StringPrintf("gl/%s", dump_name.c_str())); |
907 | 908 |
908 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, | 909 dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, |
909 base::trace_event::MemoryAllocatorDump::kUnitsBytes, | 910 base::trace_event::MemoryAllocatorDump::kUnitsBytes, |
910 GetMemoryUsage()); | 911 GetMemoryUsage()); |
911 | 912 |
912 return true; | 913 return true; |
913 } | 914 } |
914 | 915 |
915 } // namespace content | 916 } // namespace content |
OLD | NEW |