generic_shared_memory_id.cc 697 B

123456789101112131415161718192021
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ui/gfx/generic_shared_memory_id.h"
  5. #include "base/format_macros.h"
  6. #include "base/strings/stringprintf.h"
  7. namespace gfx {
  8. base::trace_event::MemoryAllocatorDumpGuid
  9. GetGenericSharedGpuMemoryGUIDForTracing(
  10. uint64_t tracing_process_id,
  11. GenericSharedMemoryId generic_shared_memory_id) {
  12. return base::trace_event::MemoryAllocatorDumpGuid(
  13. base::StringPrintf("genericsharedmemory-x-process/%" PRIx64 "/%d",
  14. tracing_process_id, generic_shared_memory_id.id));
  15. }
  16. } // namespace gfx