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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_native_pixmap.cc

Issue 2709163004: Rename GpuMemoryBufferFactoryOzoneNativePixmap to GpuMemoryBufferFactoryNativePixmap (Closed)
Patch Set: Rebase and addressed reveman's remark. 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 | « no previous file | gpu/ipc/common/gpu_memory_buffer_support.cc » ('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 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_native_pixmap.h" 5 #include "gpu/ipc/client/gpu_memory_buffer_impl_native_pixmap.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "gpu/ipc/common/gpu_memory_buffer_support.h" 10 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 return base::WrapUnique(new GpuMemoryBufferImplNativePixmap( 78 return base::WrapUnique(new GpuMemoryBufferImplNativePixmap(
79 handle.id, size, format, callback, std::move(native_pixmap), 79 handle.id, size, format, callback, std::move(native_pixmap),
80 handle.native_pixmap_handle.planes, std::move(scoped_fd))); 80 handle.native_pixmap_handle.planes, std::move(scoped_fd)));
81 } 81 }
82 82
83 // static 83 // static
84 bool GpuMemoryBufferImplNativePixmap::IsConfigurationSupported( 84 bool GpuMemoryBufferImplNativePixmap::IsConfigurationSupported(
85 gfx::BufferFormat format, 85 gfx::BufferFormat format,
86 gfx::BufferUsage usage) { 86 gfx::BufferUsage usage) {
87 #if defined(OS_LINUX)
88 return false;
89 #endif
90 return gpu::IsNativeGpuMemoryBufferConfigurationSupported(format, usage); 87 return gpu::IsNativeGpuMemoryBufferConfigurationSupported(format, usage);
91 } 88 }
92 89
93 // static 90 // static
94 base::Closure GpuMemoryBufferImplNativePixmap::AllocateForTesting( 91 base::Closure GpuMemoryBufferImplNativePixmap::AllocateForTesting(
95 const gfx::Size& size, 92 const gfx::Size& size,
96 gfx::BufferFormat format, 93 gfx::BufferFormat format,
97 gfx::BufferUsage usage, 94 gfx::BufferUsage usage,
98 gfx::GpuMemoryBufferHandle* handle) { 95 gfx::GpuMemoryBufferHandle* handle) {
99 DCHECK(IsConfigurationSupported(format, usage)); 96 DCHECK(IsConfigurationSupported(format, usage));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 handle.id = id_; 138 handle.id = id_;
142 if (fd_.is_valid()) { 139 if (fd_.is_valid()) {
143 handle.native_pixmap_handle.fds.emplace_back(fd_.get(), 140 handle.native_pixmap_handle.fds.emplace_back(fd_.get(),
144 false /* auto_close */); 141 false /* auto_close */);
145 } 142 }
146 handle.native_pixmap_handle.planes = planes_; 143 handle.native_pixmap_handle.planes = planes_;
147 return handle; 144 return handle;
148 } 145 }
149 146
150 } // namespace gpu 147 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/common/gpu_memory_buffer_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698