Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: ui/gfx/gpu_memory_buffer_tracing.cc

Issue 2819803002: Reorganize GUIDs for GPU memory buffers (Closed)
Patch Set: Address on reviews Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gfx/gpu_memory_buffer_tracing.h ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/gfx/gpu_memory_buffer_tracing.h" 5 #include "ui/gfx/gpu_memory_buffer_tracing.h"
6 6
7 #include "base/format_macros.h"
8 #include "base/strings/stringprintf.h"
9
7 namespace gfx { 10 namespace gfx {
8 11
9 base::trace_event::MemoryAllocatorDumpGuid GetGpuMemoryBufferGUIDForTracing( 12 base::trace_event::MemoryAllocatorDumpGuid GetSharedMemoryGUIDForTracing(
10 uint64_t tracing_process_id, 13 uint64_t tracing_process_id,
11 GpuMemoryBufferId buffer_id) { 14 GpuMemoryBufferId buffer_id) {
12 // TODO(ericrk): Currently this function just wraps 15 // TODO(hajimehoshi): This should be unified to shared memory GUIDs in
13 // GetGenericSharedMemoryGUIDForTracing, we may want to special case this if 16 // base/memory/shared_memory_tracker.cc
14 // the GPU memory buffer is not backed by shared memory. 17 return base::trace_event::MemoryAllocatorDumpGuid(base::StringPrintf(
15 return gfx::GetGenericSharedMemoryGUIDForTracing(tracing_process_id, 18 "shared_memory_gpu/%" PRIx64 "/%d", tracing_process_id, buffer_id.id));
16 buffer_id);
17 } 19 }
18 20
19 } // namespace gfx 21 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/gpu_memory_buffer_tracing.h ('k') | ui/gl/gl_image_io_surface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698