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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.h

Issue 2298353002: gfx: Use unsigned strides for gpu memory buffers. (Closed)
Patch Set: . Created 4 years, 3 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 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_ 5 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_
6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_ 6 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 26 matching lines...) Expand all
37 37
38 static base::Closure AllocateForTesting(const gfx::Size& size, 38 static base::Closure AllocateForTesting(const gfx::Size& size,
39 gfx::BufferFormat format, 39 gfx::BufferFormat format,
40 gfx::BufferUsage usage, 40 gfx::BufferUsage usage,
41 gfx::GpuMemoryBufferHandle* handle); 41 gfx::GpuMemoryBufferHandle* handle);
42 42
43 // Overridden from gfx::GpuMemoryBuffer: 43 // Overridden from gfx::GpuMemoryBuffer:
44 bool Map() override; 44 bool Map() override;
45 void* memory(size_t plane) override; 45 void* memory(size_t plane) override;
46 void Unmap() override; 46 void Unmap() override;
47 int stride(size_t plane) const override; 47 uint32_t stride(size_t plane) const override;
48 gfx::GpuMemoryBufferHandle GetHandle() const override; 48 gfx::GpuMemoryBufferHandle GetHandle() const override;
49 49
50 private: 50 private:
51 GpuMemoryBufferImplOzoneNativePixmap( 51 GpuMemoryBufferImplOzoneNativePixmap(
52 gfx::GpuMemoryBufferId id, 52 gfx::GpuMemoryBufferId id,
53 const gfx::Size& size, 53 const gfx::Size& size,
54 gfx::BufferFormat format, 54 gfx::BufferFormat format,
55 const DestructionCallback& callback, 55 const DestructionCallback& callback,
56 std::unique_ptr<ui::ClientNativePixmap> native_pixmap, 56 std::unique_ptr<ui::ClientNativePixmap> native_pixmap,
57 const std::vector<gfx::NativePixmapPlane>& planes, 57 const std::vector<gfx::NativePixmapPlane>& planes,
58 base::ScopedFD fd); 58 base::ScopedFD fd);
59 59
60 std::unique_ptr<ui::ClientNativePixmap> pixmap_; 60 std::unique_ptr<ui::ClientNativePixmap> pixmap_;
61 std::vector<gfx::NativePixmapPlane> planes_; 61 std::vector<gfx::NativePixmapPlane> planes_;
62 base::ScopedFD fd_; 62 base::ScopedFD fd_;
63 void* data_; 63 void* data_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzoneNativePixmap); 65 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferImplOzoneNativePixmap);
66 }; 66 };
67 67
68 } // namespace gpu 68 } // namespace gpu
69 69
70 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_ 70 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_OZONE_NATIVE_PIXMAP_H_
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl_io_surface.cc ('k') | gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698