Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ | 5 #ifndef UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ |
| 6 #define UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ | 6 #define UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/file_descriptor_posix.h" | 11 #include "base/file_descriptor_posix.h" |
| 12 #include "ui/gfx/gfx_export.h" | 12 #include "ui/gfx/gfx_export.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 | 15 |
| 16 struct GFX_EXPORT GbmBufferPlane { | |
|
Daniele Castagna
2016/06/15 03:50:20
Comment before struct definition.
vinceh
2016/06/15 04:35:18
Will fix.
| |
| 17 GbmBufferPlane(); | |
| 18 GbmBufferPlane(int stride, int offset, uint64_t modifier); | |
| 19 GbmBufferPlane(const GbmBufferPlane& other); | |
| 20 ~GbmBufferPlane(); | |
| 21 | |
| 22 // The strides and offsets in bytes to be used when accessing the buffers via | |
| 23 // a memory mapping. One per plane per entry. | |
| 24 int stride; | |
| 25 int offset; | |
| 26 uint64_t modifier; | |
|
Daniele Castagna
2016/06/15 03:50:20
nit: I think the modifier deserves a comment as we
vinceh
2016/06/15 04:35:18
Yes, will add.
| |
| 27 }; | |
| 28 | |
| 16 struct GFX_EXPORT NativePixmapHandle { | 29 struct GFX_EXPORT NativePixmapHandle { |
| 17 NativePixmapHandle(); | 30 NativePixmapHandle(); |
| 18 NativePixmapHandle(const NativePixmapHandle& other); | 31 NativePixmapHandle(const NativePixmapHandle& other); |
| 19 | 32 |
| 20 ~NativePixmapHandle(); | 33 ~NativePixmapHandle(); |
| 21 // File descriptors for the underlying memory objects (usually dmabufs). | 34 // File descriptors for the underlying memory objects (usually dmabufs). |
| 22 std::vector<base::FileDescriptor> fds; | 35 std::vector<base::FileDescriptor> fds; |
| 23 | 36 |
| 24 // The strides and offsets in bytes to be used when accessing the buffers via | 37 std::vector<GbmBufferPlane> planes; |
| 25 // a memory mapping. One per plane per entry. | |
| 26 std::vector<std::pair<int, int>> strides_and_offsets; | |
| 27 }; | 38 }; |
| 28 | 39 |
| 29 } // namespace gfx | 40 } // namespace gfx |
| 30 | 41 |
| 31 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ | 42 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ |
| OLD | NEW |