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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl_mac.cc

Issue 458313002: Browser side OZONE_NATIVE_BUFFER allocation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "content/common/gpu/client/gpu_memory_buffer_impl.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
6 6
7 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h" 7 #include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h"
8 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" 8 #include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 15 matching lines...) Expand all
26 26
27 return scoped_ptr<GpuMemoryBufferImpl>(); 27 return scoped_ptr<GpuMemoryBufferImpl>();
28 } 28 }
29 29
30 // static 30 // static
31 void GpuMemoryBufferImpl::AllocateForChildProcess( 31 void GpuMemoryBufferImpl::AllocateForChildProcess(
32 const gfx::Size& size, 32 const gfx::Size& size,
33 unsigned internalformat, 33 unsigned internalformat,
34 unsigned usage, 34 unsigned usage,
35 base::ProcessHandle child_process, 35 base::ProcessHandle child_process,
36 int child_id,
36 const AllocationCallback& callback) { 37 const AllocationCallback& callback) {
37 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( 38 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
38 size, internalformat, usage)) { 39 size, internalformat, usage)) {
39 GpuMemoryBufferImplSharedMemory::AllocateSharedMemoryForChildProcess( 40 GpuMemoryBufferImplSharedMemory::AllocateSharedMemoryForChildProcess(
40 size, internalformat, child_process, callback); 41 size, internalformat, child_process, callback);
41 return; 42 return;
42 } 43 }
43 44
44 callback.Run(gfx::GpuMemoryBufferHandle()); 45 callback.Run(gfx::GpuMemoryBufferHandle());
45 } 46 }
(...skipping 26 matching lines...) Expand all
72 return scoped_ptr<GpuMemoryBufferImpl>(); 73 return scoped_ptr<GpuMemoryBufferImpl>();
73 74
74 return buffer.PassAs<GpuMemoryBufferImpl>(); 75 return buffer.PassAs<GpuMemoryBufferImpl>();
75 } 76 }
76 default: 77 default:
77 return scoped_ptr<GpuMemoryBufferImpl>(); 78 return scoped_ptr<GpuMemoryBufferImpl>();
78 } 79 }
79 } 80 }
80 81
81 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_linux.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698