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

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

Issue 634643002: content: Out-of-process GPU service support for SurfaceTexture backed GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one last build fix Created 6 years, 2 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 "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_ozone_native_buffer.h " 7 #include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.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 28 matching lines...) Expand all
39 unsigned usage, 39 unsigned usage,
40 base::ProcessHandle child_process, 40 base::ProcessHandle child_process,
41 int child_client_id, 41 int child_client_id,
42 const AllocationCallback& callback) { 42 const AllocationCallback& callback) {
43 if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported( 43 if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(
44 internalformat, usage)) { 44 internalformat, usage)) {
45 GpuMemoryBufferImplOzoneNativeBuffer::AllocateForChildProcess( 45 GpuMemoryBufferImplOzoneNativeBuffer::AllocateForChildProcess(
46 size, internalformat, usage, child_client_id, callback); 46 size, internalformat, usage, child_client_id, callback);
47 return; 47 return;
48 } 48 }
49
49 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( 50 if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
50 size, internalformat, usage)) { 51 size, internalformat, usage)) {
51 GpuMemoryBufferImplSharedMemory::AllocateForChildProcess( 52 GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
52 size, internalformat, child_process, callback); 53 size, internalformat, child_process, callback);
53 return; 54 return;
54 } 55 }
55 56
56 callback.Run(gfx::GpuMemoryBufferHandle()); 57 callback.Run(gfx::GpuMemoryBufferHandle());
57 } 58 }
58 59
(...skipping 16 matching lines...) Expand all
75 handle, size, internalformat, callback); 76 handle, size, internalformat, callback);
76 case gfx::OZONE_NATIVE_BUFFER: 77 case gfx::OZONE_NATIVE_BUFFER:
77 return GpuMemoryBufferImplOzoneNativeBuffer::CreateFromHandle( 78 return GpuMemoryBufferImplOzoneNativeBuffer::CreateFromHandle(
78 handle, size, internalformat, callback); 79 handle, size, internalformat, callback);
79 default: 80 default:
80 return scoped_ptr<GpuMemoryBufferImpl>(); 81 return scoped_ptr<GpuMemoryBufferImpl>();
81 } 82 }
82 } 83 }
83 84
84 } // namespace content 85 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698