Index: ui/ozone/platform/drm/common/native_pixmap_manager_gbm.cc |
diff --git a/ui/ozone/platform/drm/common/native_pixmap_manager_gbm.cc b/ui/ozone/platform/drm/common/native_pixmap_manager_gbm.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..abc2ebe12e347f0898c8619302fb4c7157ff5e20 |
--- /dev/null |
+++ b/ui/ozone/platform/drm/common/native_pixmap_manager_gbm.cc |
@@ -0,0 +1,46 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "ui/ozone/platform/drm/common/native_pixmap_manager_gbm.h" |
+ |
+#include "base/file_descriptor_posix.h" |
+#include "ui/ozone/public/native_pixmap_manager.h" |
+ |
+namespace ui { |
+ |
+namespace { |
+ |
+class NativePixmapManagerGbm : public NativePixmapManager { |
+ public: |
+ NativePixmapManagerGbm() {} |
+ ~NativePixmapManagerGbm() override {} |
+ |
+ // NativePixmapManager: |
+ std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
+ const override { |
+ std::vector<Configuration> configurations = { |
+ {SurfaceFactoryOzone::BGRA_8888, SurfaceFactoryOzone::SCANOUT}, |
+ {SurfaceFactoryOzone::RGBX_8888, SurfaceFactoryOzone::SCANOUT}}; |
+ return configurations; |
+ } |
+ scoped_refptr<NativePixmap> ImportNativePixmap( |
+ base::FileDescriptor handle, |
+ gfx::Size size, |
+ SurfaceFactoryOzone::BufferFormat format, |
+ SurfaceFactoryOzone::BufferUsage usage) override { |
+ NOTIMPLEMENTED(); |
+ return nullptr; |
+ } |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(NativePixmapManagerGbm); |
+}; |
+ |
+} // namespace |
+ |
+NativePixmapManager* CreateNativePixmapManagerGbm() { |
+ return new NativePixmapManagerGbm(); |
+} |
+ |
+} // namespace ui |