Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_OZONE_PLATFORM_DRM_GPU_CLIENT_NATIVE_PIXMAP_VGEM_H_ | |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_CLIENT_NATIVE_PIXMAP_VGEM_H_ | |
| 7 | |
| 8 #include "base/file_descriptor_posix.h" | |
| 9 #include "ui/gfx/geometry/size.h" | |
| 10 #include "ui/gfx/native_pixmap_handle_ozone.h" | |
| 11 #include "ui/ozone/public/client_native_pixmap.h" | |
| 12 | |
| 13 namespace ui { | |
| 14 | |
| 15 class ClientNativePixmapVgem : public ClientNativePixmap { | |
| 16 public: | |
| 17 static scoped_ptr<ClientNativePixmap> Create( | |
| 18 const gfx::NativePixmapHandle& handle, | |
| 19 const base::FileDescriptor& vgem_handle, | |
| 20 const gfx::Size& size); | |
| 21 | |
| 22 ~ClientNativePixmapVgem() override; | |
| 23 | |
| 24 // Overridden from ClientNativePixmap. | |
| 25 bool Map(void** data) override; | |
| 26 void Unmap() override; | |
| 27 void GetStride(int* stride) const override; | |
| 28 | |
| 29 private: | |
| 30 ClientNativePixmapVgem(const gfx::NativePixmapHandle& handle, | |
| 31 const base::FileDescriptor& vgem_handle, | |
| 32 const gfx::Size& size, | |
| 33 uint32_t vgem_bo_handle); | |
| 34 | |
| 35 base::ScopedFD dma_buf_; | |
| 36 base::FileDescriptor vgem_fd_; | |
| 37 gfx::Size size_; | |
| 38 uint32_t vgem_bo_handle_; | |
| 39 int stride_; | |
| 40 void* data_; | |
|
reveman
2015/08/07 17:59:44
can some of these members be const?
dshwang
2015/08/11 17:44:56
good point. all except for |data_|. Done.
| |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapVgem); | |
| 43 }; | |
| 44 | |
| 45 } // namespace ui | |
| 46 | |
| 47 #endif // UI_OZONE_PLATFORM_DRM_GPU_CLIENT_NATIVE_PIXMAP_VGEM_H_ | |
| OLD | NEW |