Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ | |
| 6 #define UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/file_descriptor_posix.h" | |
|
dshwang
2016/03/23 15:52:51
needed?
vignatti (out of this project)
2016/03/23 19:46:07
Done.
| |
| 11 #include "base/macros.h" | |
| 12 #include "ui/gfx/geometry/size.h" | |
| 13 #include "ui/gfx/native_pixmap_handle_ozone.h" | |
|
dshwang
2016/03/23 15:52:51
needed?
vignatti (out of this project)
2016/03/23 19:46:07
Done.
| |
| 14 #include "ui/ozone/public/client_native_pixmap.h" | |
| 15 | |
| 16 namespace ui { | |
| 17 | |
| 18 class ClientNativePixmapDmaBuf : public ClientNativePixmap { | |
| 19 public: | |
| 20 static scoped_ptr<ClientNativePixmap> ImportFromDmabuf(int dmabuf_fd, | |
| 21 const gfx::Size& size, | |
| 22 int stride); | |
| 23 | |
| 24 ~ClientNativePixmapDmaBuf() override; | |
| 25 | |
| 26 // Overridden from ClientNativePixmap. | |
| 27 void* Map() override; | |
| 28 void Unmap() override; | |
| 29 void GetStride(int* stride) const override; | |
| 30 | |
| 31 private: | |
| 32 ClientNativePixmapDmaBuf(int dmabuf_fd, const gfx::Size& size, int stride); | |
| 33 | |
| 34 const gfx::Size size_; | |
| 35 const int stride_; | |
| 36 void* data_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf); | |
| 39 }; | |
| 40 | |
| 41 } // namespace ui | |
| 42 | |
| 43 #endif // UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ | |
| OLD | NEW |