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

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

Issue 2298003002: gfx: Struct traits for GpuMemoryBufferHandle. (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
« no previous file with comments | « ui/gfx/native_pixmap_handle.cc ('k') | ui/gfx/native_pixmap_handle_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_
6 #define UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_
7
8 #include <stdint.h>
9 #include <vector>
10
11 #include "base/file_descriptor_posix.h"
12 #include "ui/gfx/gfx_export.h"
13
14 namespace gfx {
15
16 // NativePixmapPlane 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 NativePixmapPlane {
19 NativePixmapPlane();
20 NativePixmapPlane(int stride, int offset, uint64_t modifier);
21 NativePixmapPlane(const NativePixmapPlane& other);
22 ~NativePixmapPlane();
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 modifier is retrieved from GBM library and passed to EGL driver.
29 // Generally it's platform specific, and we don't need to modify it in
30 // Chromium code. Also one per plane per entry.
31 uint64_t modifier;
32 };
33
34 struct GFX_EXPORT NativePixmapHandle {
35 NativePixmapHandle();
36 NativePixmapHandle(const NativePixmapHandle& other);
37
38 ~NativePixmapHandle();
39 // File descriptors for the underlying memory objects (usually dmabufs).
40 std::vector<base::FileDescriptor> fds;
41
42 std::vector<NativePixmapPlane> planes;
43 };
44
45 } // namespace gfx
46
47 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_OZONE_H_
OLDNEW
« no previous file with comments | « ui/gfx/native_pixmap_handle.cc ('k') | ui/gfx/native_pixmap_handle_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698