OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "services/ui/public/cpp/gpu/context_provider_command_buffer.h" | 5 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 uint64_t value) override { | 71 uint64_t value) override { |
72 auto* dump = GetOrCreateAllocatorDump(dump_name); | 72 auto* dump = GetOrCreateAllocatorDump(dump_name); |
73 dump->AddScalar(value_name, units, value); | 73 dump->AddScalar(value_name, units, value); |
74 } | 74 } |
75 | 75 |
76 void setMemoryBacking(const char* dump_name, | 76 void setMemoryBacking(const char* dump_name, |
77 const char* backing_type, | 77 const char* backing_type, |
78 const char* backing_object_id) override { | 78 const char* backing_object_id) override { |
79 const uint64_t tracing_process_id = | 79 const uint64_t tracing_process_id = |
80 base::trace_event::MemoryDumpManager::GetInstance() | 80 base::trace_event::MemoryDumpManager::GetInstance() |
81 ->GetTracingProcessId(); | 81 ->tracing_process_id(); |
82 | 82 |
83 // For uniformity, skia provides this value as a string. Convert back to a | 83 // For uniformity, skia provides this value as a string. Convert back to a |
84 // uint32_t. | 84 // uint32_t. |
85 uint32_t gl_id = | 85 uint32_t gl_id = |
86 std::strtoul(backing_object_id, nullptr /* str_end */, 10 /* base */); | 86 std::strtoul(backing_object_id, nullptr /* str_end */, 10 /* base */); |
87 | 87 |
88 // Constants used by SkiaGpuTraceMemoryDump to identify different memory | 88 // Constants used by SkiaGpuTraceMemoryDump to identify different memory |
89 // types. | 89 // types. |
90 const char* kGLTextureBackingType = "gl_texture"; | 90 const char* kGLTextureBackingType = "gl_texture"; |
91 const char* kGLBufferBackingType = "gl_buffer"; | 91 const char* kGLBufferBackingType = "gl_buffer"; |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 context_thread_checker_.DetachFromThread(); | 458 context_thread_checker_.DetachFromThread(); |
459 SkiaGpuTraceMemoryDump trace_memory_dump( | 459 SkiaGpuTraceMemoryDump trace_memory_dump( |
460 pmd, gles2_impl_->ShareGroupTracingGUID()); | 460 pmd, gles2_impl_->ShareGroupTracingGUID()); |
461 gr_context_->get()->dumpMemoryStatistics(&trace_memory_dump); | 461 gr_context_->get()->dumpMemoryStatistics(&trace_memory_dump); |
462 context_thread_checker_.DetachFromThread(); | 462 context_thread_checker_.DetachFromThread(); |
463 } | 463 } |
464 return true; | 464 return true; |
465 } | 465 } |
466 | 466 |
467 } // namespace ui | 467 } // namespace ui |
OLD | NEW |