OLD | NEW |
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_OZONE_PLATFORM_DRM_COMMON_NATIVE_PIXMAP_MANAGER_GBM_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_COMMON_NATIVE_PIXMAP_MANAGER_GBM_H_ |
6 #define UI_OZONE_PLATFORM_DRM_COMMON_NATIVE_PIXMAP_MANAGER_GBM_H_ | 6 #define UI_OZONE_PLATFORM_DRM_COMMON_NATIVE_PIXMAP_MANAGER_GBM_H_ |
7 | 7 |
8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
9 #include "ui/ozone/public/native_pixmap_manager.h" | 9 #include "ui/ozone/public/native_pixmap_manager.h" |
10 | 10 |
11 namespace ui { | 11 namespace ui { |
12 | 12 |
13 // Constructor hook for use in constructor_list.cc | 13 // Constructor hook for use in constructor_list.cc |
14 NativePixmapManager* CreateNativePixmapManagerGbm(); | 14 NativePixmapManager* CreateNativePixmapManagerGbm(); |
15 | 15 |
16 class NativePixmapManagerGbm : public NativePixmapManager { | 16 class NativePixmapManagerGbm : public NativePixmapManager { |
17 public: | 17 public: |
18 NativePixmapManagerGbm(); | 18 NativePixmapManagerGbm(); |
19 ~NativePixmapManagerGbm() override; | 19 ~NativePixmapManagerGbm() override; |
20 | 20 |
21 // NativePixmapManager: | 21 // NativePixmapManager: |
22 void Initialize(const base::FileDescriptor& device_fd) override; | 22 void Initialize(const base::FileDescriptor& device_fd) override; |
23 std::vector<Configuration> GetSupportedNativePixmapConfigurations() | 23 std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
24 const override; | 24 const override; |
| 25 scoped_refptr<NativePixmap> CreateFromFileDescriptor( |
| 26 base::FileDescriptor handle, |
| 27 gfx::Size size, |
| 28 SurfaceFactoryOzone::BufferFormat format, |
| 29 SurfaceFactoryOzone::BufferUsage usage) override; |
25 | 30 |
26 private: | 31 private: |
27 base::ScopedFD vgem_fd_; | 32 base::ScopedFD vgem_fd_; |
28 | 33 |
29 DISALLOW_COPY_AND_ASSIGN(NativePixmapManagerGbm); | 34 DISALLOW_COPY_AND_ASSIGN(NativePixmapManagerGbm); |
30 }; | 35 }; |
31 | 36 |
32 } // namespace ui | 37 } // namespace ui |
33 | 38 |
34 #endif // UI_OZONE_PLATFORM_DRM_COMMON_NATIVE_PIXMAP_MANAGER_GBM_H_ | 39 #endif // UI_OZONE_PLATFORM_DRM_COMMON_NATIVE_PIXMAP_MANAGER_GBM_H_ |
OLD | NEW |