| 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..ee6fcebca33e0c7f03b54e4e30a53937c2c692f2
|
| --- /dev/null
|
| +++ b/ui/ozone/platform/drm/common/native_pixmap_manager_gbm.cc
|
| @@ -0,0 +1,35 @@
|
| +// 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"
|
| +
|
| +namespace ui {
|
| +
|
| +NativePixmapManager* CreateNativePixmapManagerGbm() {
|
| + return new NativePixmapManagerGbm();
|
| +}
|
| +
|
| +NativePixmapManagerGbm::NativePixmapManagerGbm() {
|
| +}
|
| +
|
| +NativePixmapManagerGbm::~NativePixmapManagerGbm() {
|
| +}
|
| +
|
| +void NativePixmapManagerGbm::Initialize(const base::FileDescriptor& device_fd) {
|
| + DCHECK_EQ(vgem_fd_.get(), -1);
|
| + if (device_fd.fd > 0)
|
| + vgem_fd_.reset(device_fd.fd);
|
| +}
|
| +
|
| +std::vector<NativePixmapManager::Configuration>
|
| +NativePixmapManagerGbm::GetSupportedNativePixmapConfigurations() const {
|
| + std::vector<Configuration> configurations = {
|
| + {SurfaceFactoryOzone::BGRA_8888, SurfaceFactoryOzone::SCANOUT},
|
| + {SurfaceFactoryOzone::RGBX_8888, SurfaceFactoryOzone::SCANOUT}};
|
| + return configurations;
|
| +}
|
| +
|
| +} // namespace ui
|
|
|