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/client_native_pixmap_factory_gbm.h" |
| 6 |
| 7 #include "base/file_descriptor_posix.h" |
| 8 #include "ui/ozone/public/client_native_pixmap_factory.h" |
| 9 |
| 10 namespace ui { |
| 11 |
| 12 namespace { |
| 13 |
| 14 class ClientNativePixmapFactoryGbm : public ClientNativePixmapFactory { |
| 15 public: |
| 16 ClientNativePixmapFactoryGbm() {} |
| 17 ~ClientNativePixmapFactoryGbm() override {} |
| 18 |
| 19 // ClientNativePixmapFactory: |
| 20 std::vector<Configuration> GetSupportedConfigurations() const override { |
| 21 const Configuration kConfiguratioins[] = { |
| 22 {gfx::BufferFormat::BGRA_8888, gfx::BufferUsage::SCANOUT}, |
| 23 {gfx::BufferFormat::RGBX_8888, gfx::BufferUsage::SCANOUT}}; |
| 24 std::vector<Configuration> configurations( |
| 25 kConfiguratioins, kConfiguratioins + arraysize(kConfiguratioins)); |
| 26 return configurations; |
| 27 } |
| 28 scoped_ptr<ClientNativePixmap> ImportNativePixmap( |
| 29 const base::FileDescriptor& handle, |
| 30 const gfx::Size& size, |
| 31 gfx::BufferFormat format, |
| 32 gfx::BufferUsage usage) override { |
| 33 NOTIMPLEMENTED(); |
| 34 return nullptr; |
| 35 } |
| 36 |
| 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryGbm); |
| 39 }; |
| 40 |
| 41 } // namespace |
| 42 |
| 43 ClientNativePixmapFactory* CreateClientNativePixmapFactoryGbm() { |
| 44 return new ClientNativePixmapFactoryGbm(); |
| 45 } |
| 46 |
| 47 } // namespace ui |
OLD | NEW |