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

Side by Side Diff: ui/gfx/native_pixmap_handle_ozone.h

Issue 2039813002: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add format modifier IDs for EGL_EXT_image_dma_buf_import extension Created 4 years, 6 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 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 // GbmBufferPlane is used to carry the plane related information for GBM
17 // buffer. More fields can be added if they are plane specific.
18 struct GFX_EXPORT GbmBufferPlane {
19 GbmBufferPlane();
20 GbmBufferPlane(int stride, int offset, uint64_t modifier);
21 GbmBufferPlane(const GbmBufferPlane& other);
22 ~GbmBufferPlane();
23
24 // The strides and offsets in bytes to be used when accessing the buffers via
25 // a memory mapping. One per plane per entry.
26 int stride;
27 int offset;
28 // The modifiers is retrieved from GBM library and passed to EGL driver.
Daniele Castagna 2016/06/15 17:30:09 nit: s/modifiers/modifier or make the verb plural.
vinceh 2016/06/16 02:08:44 Oops. Will fix.
29 // Generally it's platform specific, and we don't need to modify it in
30 // browser code. Also one per plane per entry.
Daniele Castagna 2016/06/15 17:30:09 nit: if you use the term browser in chromium, we p
vinceh 2016/06/16 02:08:44 Yes, will fix.
31 uint64_t modifier;
32 };
33
16 struct GFX_EXPORT NativePixmapHandle { 34 struct GFX_EXPORT NativePixmapHandle {
17 NativePixmapHandle(); 35 NativePixmapHandle();
18 NativePixmapHandle(const NativePixmapHandle& other); 36 NativePixmapHandle(const NativePixmapHandle& other);
19 37
20 ~NativePixmapHandle(); 38 ~NativePixmapHandle();
21 // File descriptors for the underlying memory objects (usually dmabufs). 39 // File descriptors for the underlying memory objects (usually dmabufs).
22 std::vector<base::FileDescriptor> fds; 40 std::vector<base::FileDescriptor> fds;
23 41
24 // The strides and offsets in bytes to be used when accessing the buffers via 42 std::vector<GbmBufferPlane> planes;
25 // a memory mapping. One per plane per entry.
26 std::vector<std::pair<int, int>> strides_and_offsets;
27 }; 43 };
28 44
29 } // namespace gfx 45 } // namespace gfx
30 46
31 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_ 47 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698