OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
reveman
2017/04/12 18:21:36
do we need to add this class/file? Can we instead
Julien Isorce
2017/04/13 12:46:02
Could you elaborate ? Because here this is the ser
| |
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_LINUX_NATIVE_PIXMAP_DMABUF_STUB_H_ | |
6 #define UI_GFX_LINUX_NATIVE_PIXMAP_DMABUF_STUB_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <memory> | |
11 | |
12 #include "base/files/scoped_file.h" | |
13 #include "base/macros.h" | |
14 #include "ui/gfx/client_native_pixmap.h" | |
15 #include "ui/gfx/geometry/size.h" | |
16 #include "ui/gfx/native_pixmap.h" | |
17 | |
18 namespace ui { | |
19 | |
20 class NativePixmapDmaBufStub : public NativePixmap { | |
21 public: | |
22 NativePixmapDmaBufStub(const gfx::Size& size, | |
23 gfx::BufferFormat format, | |
24 const gfx::NativePixmapHandle& handle); | |
25 | |
26 ~NativePixmapDmaBufStub() override; | |
27 | |
28 // NativePixmap: | |
29 void* GetEGLClientBuffer() const override; | |
30 bool AreDmaBufFdsValid() const override; | |
31 size_t GetDmaBufFdCount() const override; | |
32 int GetDmaBufFd(size_t plane) const override; | |
33 int GetDmaBufPitch(size_t plane) const override; | |
34 int GetDmaBufOffset(size_t plane) const override; | |
35 uint64_t GetDmaBufModifier(size_t plane) const override; | |
36 gfx::BufferFormat GetBufferFormat() const override; | |
37 gfx::Size GetBufferSize() const override; | |
38 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, | |
39 int plane_z_order, | |
40 gfx::OverlayTransform plane_transform, | |
41 const gfx::Rect& display_bounds, | |
42 const gfx::RectF& crop_rect) override; | |
43 void SetProcessingCallback( | |
44 const ProcessingCallback& processing_callback) override; | |
45 gfx::NativePixmapHandle ExportHandle() override; | |
46 | |
47 private: | |
48 gfx::Size size_; | |
49 gfx::BufferFormat format_; | |
50 std::vector<base::ScopedFD> fds_; | |
51 std::vector<gfx::NativePixmapPlane> planes_; | |
52 | |
53 DISALLOW_COPY_AND_ASSIGN(NativePixmapDmaBufStub); | |
54 }; | |
55 | |
56 } // namespace ui | |
57 | |
58 #endif // UI_GFX_LINUX_NATIVE_PIXMAP_DMABUF_STUB_H_ | |
OLD | NEW |