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 #include "ui/ozone/platform/drm/common/native_pixmap_manager_gbm.h" |
| 6 |
| 7 #include "base/file_descriptor_posix.h" |
| 8 #include "ui/ozone/public/native_pixmap_manager.h" |
| 9 |
| 10 namespace ui { |
| 11 |
| 12 namespace { |
| 13 |
| 14 class NativePixmapManagerGbm : public NativePixmapManager { |
| 15 public: |
| 16 NativePixmapManagerGbm() {} |
| 17 ~NativePixmapManagerGbm() override {} |
| 18 |
| 19 // NativePixmapManager: |
| 20 std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
| 21 const override { |
| 22 std::vector<Configuration> configurations = { |
| 23 {SurfaceFactoryOzone::BGRA_8888, SurfaceFactoryOzone::SCANOUT}, |
| 24 {SurfaceFactoryOzone::RGBX_8888, SurfaceFactoryOzone::SCANOUT}}; |
| 25 return configurations; |
| 26 } |
| 27 scoped_refptr<NativePixmap> ImportNativePixmap( |
| 28 base::FileDescriptor handle, |
| 29 gfx::Size size, |
| 30 SurfaceFactoryOzone::BufferFormat format, |
| 31 SurfaceFactoryOzone::BufferUsage usage) override { |
| 32 NOTIMPLEMENTED(); |
| 33 return nullptr; |
| 34 } |
| 35 |
| 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(NativePixmapManagerGbm); |
| 38 }; |
| 39 |
| 40 } // namespace |
| 41 |
| 42 NativePixmapManager* CreateNativePixmapManagerGbm() { |
| 43 return new NativePixmapManagerGbm(); |
| 44 } |
| 45 |
| 46 } // namespace ui |
OLD | NEW |