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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h" 5 #include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/numerics/safe_math.h" 12 #include "base/numerics/safe_math.h"
13 #include "base/process/memory.h" 13 #include "base/process/memory.h"
14 #include "ui/gfx/buffer_format_util.h" 14 #include "ui/gfx/buffer_format_util.h"
15 #include "ui/gfx/gpu_memory_buffer_tracing.h"
15 #include "ui/gl/gl_bindings.h" 16 #include "ui/gl/gl_bindings.h"
16 17
17 namespace gpu { 18 namespace gpu {
18 19
19 GpuMemoryBufferImplSharedMemory::GpuMemoryBufferImplSharedMemory( 20 GpuMemoryBufferImplSharedMemory::GpuMemoryBufferImplSharedMemory(
20 gfx::GpuMemoryBufferId id, 21 gfx::GpuMemoryBufferId id,
21 const gfx::Size& size, 22 const gfx::Size& size,
22 gfx::BufferFormat format, 23 gfx::BufferFormat format,
23 const DestructionCallback& callback, 24 const DestructionCallback& callback,
24 std::unique_ptr<base::SharedMemory> shared_memory, 25 std::unique_ptr<base::SharedMemory> shared_memory,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSharedMemory::GetHandle() const { 205 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSharedMemory::GetHandle() const {
205 gfx::GpuMemoryBufferHandle handle; 206 gfx::GpuMemoryBufferHandle handle;
206 handle.type = gfx::SHARED_MEMORY_BUFFER; 207 handle.type = gfx::SHARED_MEMORY_BUFFER;
207 handle.id = id_; 208 handle.id = id_;
208 handle.offset = offset_; 209 handle.offset = offset_;
209 handle.stride = stride_; 210 handle.stride = stride_;
210 handle.handle = shared_memory_->handle(); 211 handle.handle = shared_memory_->handle();
211 return handle; 212 return handle;
212 } 213 }
213 214
215 base::trace_event::MemoryAllocatorDumpGuid
216 GpuMemoryBufferImplSharedMemory::GetGUIDForTracing(
217 uint64_t tracing_process_id) const {
218 return gfx::GetSharedMemoryGUIDForTracing(tracing_process_id, id_);
219 }
220
214 } // namespace gpu 221 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h ('k') | media/video/gpu_memory_buffer_video_frame_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698